Skip to content

Commit e1e6b93

Browse files
Thomas-fouriermiquelraynal
authored andcommitted
mtd: rawnand: atmel: Fix dma_mapping_error() address
It seems like what was intended is to test if the dma_map of the previous line failed but the wrong dma address was passed. Fixes: f88fc12 ("mtd: nand: Cleanup/rework the atmel_nand driver") Signed-off-by: Thomas Fourier <[email protected]> Rule: add Link: https://lore.kernel.org/stable/20250702064515.18145-2-fourier.thomas%40gmail.com Signed-off-by: Miquel Raynal <[email protected]>
1 parent 23584da commit e1e6b93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static int atmel_nand_dma_transfer(struct atmel_nand_controller *nc,
373373
dma_cookie_t cookie;
374374

375375
buf_dma = dma_map_single(nc->dev, buf, len, dir);
376-
if (dma_mapping_error(nc->dev, dev_dma)) {
376+
if (dma_mapping_error(nc->dev, buf_dma)) {
377377
dev_err(nc->dev,
378378
"Failed to prepare a buffer for DMA access\n");
379379
goto err;

0 commit comments

Comments
 (0)