Commit 8e1fab9c authored by Thomas Fourier's avatar Thomas Fourier Committed by Jens Axboe
Browse files

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: 88523a61 ("block: Add driver for Micron RealSSD pcie flash cards")
Signed-off-by: default avatarThomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250627121123.203731-2-fourier.thomas@gmail.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 5a593def
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment