diff options
| author | Thomas Fourier <[email protected]> | 2025-07-02 06:45:11 +0000 |
|---|---|---|
| committer | Miquel Raynal <[email protected]> | 2025-07-30 09:27:30 +0000 |
| commit | e1e6b933c56b1e9fda93caa0b8bae39f3f421e5c (patch) | |
| tree | d79af83a344b87751e9b1a9df66a3f8d6c1d2046 /drivers/mtd/nand/raw/atmel/nand-controller.c | |
| parent | mtd: nand: brcmnand: fix mtd corrected bits stat (diff) | |
| download | kernel-e1e6b933c56b1e9fda93caa0b8bae39f3f421e5c.tar.gz kernel-e1e6b933c56b1e9fda93caa0b8bae39f3f421e5c.zip | |
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: f88fc122cc34 ("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]>
Diffstat (limited to 'drivers/mtd/nand/raw/atmel/nand-controller.c')
| -rw-r--r-- | drivers/mtd/nand/raw/atmel/nand-controller.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index dedcca87defc..84ab4a83cbd6 100644 --- a/drivers/mtd/nand/raw/atmel/nand-controller.c +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c @@ -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; |
