Skip to content

Commit ff09b71

Browse files
Thomas-fourierUlf Hansson
authored andcommitted
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: 2f5da67 ("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>
1 parent 6d0b1c0 commit ff09b71

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/mmc/host/bcm2835.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,8 @@ void bcm2835_prepare_dma(struct bcm2835_host *host, struct mmc_data *data)
503503
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
504504

505505
if (!desc) {
506-
dma_unmap_sg(dma_chan->device->dev, data->sg, sg_len, dir_data);
506+
dma_unmap_sg(dma_chan->device->dev, data->sg, data->sg_len,
507+
dir_data);
507508
return;
508509
}
509510

0 commit comments

Comments
 (0)