Skip to content

Commit 0410e1a

Browse files
Chen Nimiquelraynal
authored andcommitted
mtd: rawnand: cadence: Fix error check for dma_alloc_coherent() in cadence_nand_init()
Fix wrong variable used for error checking after dma_alloc_coherent() call. The function checks cdns_ctrl->dma_cdma_desc instead of cdns_ctrl->cdma_desc, which could lead to incorrect error handling. Fixes: ec4ba01 ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem") Cc: stable@vger.kernel.org Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Alok Tiwari <alok.a.tiwari@oracle.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
1 parent 8e2f802 commit 0410e1a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mtd/nand/raw/cadence-nand-controller.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3133,7 +3133,7 @@ static int cadence_nand_init(struct cdns_nand_ctrl *cdns_ctrl)
31333133
sizeof(*cdns_ctrl->cdma_desc),
31343134
&cdns_ctrl->dma_cdma_desc,
31353135
GFP_KERNEL);
3136-
if (!cdns_ctrl->dma_cdma_desc)
3136+
if (!cdns_ctrl->cdma_desc)
31373137
return -ENOMEM;
31383138

31393139
cdns_ctrl->buf_size = SZ_16K;

0 commit comments

Comments
 (0)