diff options
author | Thomas Fourier <fourier.thomas@gmail.com> | 2025-06-30 12:35:07 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2025-07-03 15:16:16 +0300 |
commit | ff09b71bf9daeca4f21d6e5e449641c9fad75b53 (patch) | |
tree | ac4635ea5e8e2ade6910ea7d17001106c4d8b399 | |
parent | 6d0b1c01847fedd7c85a5cdf59b8cfc7d14512e6 (diff) | |
download | linux-ff09b71bf9daeca4f21d6e5e449641c9fad75b53.tar.xz |
mmc: bcm2835: Fix dma_unmap_sg() nents value
The dma_unmap_sg() functions should be called with the same nents as the
dma_map_sg(), not the value the map function returned.
Fixes: 2f5da678351f ("mmc: bcm2835: Properly handle dmaengine_prep_slave_sg")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250630093510.82871-2-fourier.thomas@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/bcm2835.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index def054ddd256..4fced9b36c80 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -503,7 +503,8 @@ void bcm2835_prepare_dma(struct bcm2835_host *host, struct mmc_data *data) DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc) { - dma_unmap_sg(dma_chan->device->dev, data->sg, sg_len, dir_data); + dma_unmap_sg(dma_chan->device->dev, data->sg, data->sg_len, + dir_data); return; } |