Commit c43ec96
dmaengine: at_xdmac: avoid null_prt_deref in at_xdmac_prep_dma_memset
The at_xdmac_memset_create_desc may return NULL, which will lead to a
null pointer dereference. For example, the len input is error, or the
atchan->free_descs_list is empty and memory is exhausted. Therefore, add
check to avoid this.
Fixes: b206d9a ("dmaengine: xdmac: Add memset support")
Signed-off-by: Chen Ridong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>1 parent 40384c8 commit c43ec96
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1363 | 1363 | | |
1364 | 1364 | | |
1365 | 1365 | | |
| 1366 | + | |
| 1367 | + | |
1366 | 1368 | | |
1367 | 1369 | | |
1368 | 1370 | | |
| |||
0 commit comments