mtd: nand: Fix dma_mapping_error() address
Subsystems (4)
PATCH 1/1 mtd: nand: 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 f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
Signed-off-by Thomas Fourier <[email protected]>
--- drivers/mtd/nand/raw/atmel/nand-controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/raw/atmel/nand-controller.c +1 -1
@@ -373,7 +373,7 @@ static int atmel_nand_dma_transfer(struct atmel_nand_controller *nc,dma_cookie_t cookie; buf_dma =dma_map_single (nc->dev, buf, len, dir); -if (dma_mapping_error (nc->dev, dev_dma)) { +if (dma_mapping_error (nc->dev, buf_dma)) {dev_err (nc->dev,"Failed to prepare a buffer for DMA access\n" ); goto err;
Signature · 1 line
2.43.0
Miquel Raynal
maintainerHi Thomas,
Thanks for the patch!
On 01/07/2025 at 13:44:23 +02, Thomas Fourier <[email protected]> wrote:
The subject prefix should be 'mtd: rawnand: atmel:'
Quoted 5 lines
It seems like what was intended is to test if the
dma_mapof the previous line failed but the wrong dma address was passed.Fixes f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nanddriver")
Missing:
Quoted 2 lines
Signed-off-by Thomas Fourier <[email protected]>---
Otherwise looks good to me!
Thanks,
Miquèl