linux-loongson/drivers/block/mtip32xx
Thomas Fourier 8e1fab9ccc block: mtip32xx: Fix usage of dma_map_sg()
The dma_map_sg() can fail and, in case of failure, returns 0.  If it
fails, mtip_hw_submit_io() returns an error.

The dma_unmap_sg() requires the nents parameter to be the same as the
one passed to dma_map_sg(). This patch saves the nents in
command->scatter_ents.

Fixes: 88523a6155 ("block: Add driver for Micron RealSSD pcie flash cards")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250627121123.203731-2-fourier.thomas@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-07-08 11:55:38 -06:00
..
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mtip32xx.c block: mtip32xx: Fix usage of dma_map_sg() 2025-07-08 11:55:38 -06:00
mtip32xx.h mtip32xx: fix device removal 2022-06-28 06:30:26 -06:00