Commit 5c56bf2
mtd: rawnand: cadence: fix DMA device NULL pointer dereference
The DMA device pointer `dma_dev` was being dereferenced before ensuring
that `cdns_ctrl->dmac` is properly initialized.
Move the assignment of `dma_dev` after successfully acquiring the DMA
channel to ensure the pointer is valid before use.
Fixes: d76d22b ("mtd: rawnand: cadence: use dma_map_resource for sdma address")
Cc: [email protected]
Signed-off-by: Niravkumar L Rabara <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>1 parent 9631350 commit 5c56bf2
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2871 | 2871 | | |
2872 | 2872 | | |
2873 | 2873 | | |
2874 | | - | |
| 2874 | + | |
2875 | 2875 | | |
2876 | 2876 | | |
2877 | 2877 | | |
| |||
2915 | 2915 | | |
2916 | 2916 | | |
2917 | 2917 | | |
| 2918 | + | |
2918 | 2919 | | |
2919 | 2920 | | |
2920 | 2921 | | |
| |||
0 commit comments