diff options
| author | Tudor Ambarus <[email protected]> | 2022-07-28 07:40:14 +0000 |
|---|---|---|
| committer | Miquel Raynal <[email protected]> | 2022-09-21 08:38:46 +0000 |
| commit | 1161703c9bd664da5e3b2eb1a3bb40c210e026ea (patch) | |
| tree | f6a2599d990da5f9228380230a4f52c21454873c /drivers/mtd/nand/raw/atmel/nand-controller.c | |
| parent | mtd: rawnand: meson: fix bit map use in meson_nfc_ecc_correct() (diff) | |
| download | kernel-1161703c9bd664da5e3b2eb1a3bb40c210e026ea.tar.gz kernel-1161703c9bd664da5e3b2eb1a3bb40c210e026ea.zip | |
mtd: rawnand: atmel: Unmap streaming DMA mappings
Every dma_map_single() call should have its dma_unmap_single() counterpart,
because the DMA address space is a shared resource and one could render the
machine unusable by consuming all DMA addresses.
Link: https://lore.kernel.org/lkml/[email protected]/
Cc: [email protected]
Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
Signed-off-by: Tudor Ambarus <[email protected]>
Acked-by: Alexander Dahl <[email protected]>
Reported-by: Peter Rosin <[email protected]>
Tested-by: Alexander Dahl <[email protected]>
Reviewed-by: Boris Brezillon <[email protected]>
Tested-by: Peter Rosin <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
Diffstat (limited to 'drivers/mtd/nand/raw/atmel/nand-controller.c')
| -rw-r--r-- | drivers/mtd/nand/raw/atmel/nand-controller.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index c9ac3baf68c0..41c6bd6e2d72 100644 --- a/drivers/mtd/nand/raw/atmel/nand-controller.c +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c @@ -405,6 +405,7 @@ static int atmel_nand_dma_transfer(struct atmel_nand_controller *nc, dma_async_issue_pending(nc->dmac); wait_for_completion(&finished); + dma_unmap_single(nc->dev, buf_dma, len, dir); return 0; |
