Skip to content

Commit 8ab2f1c

Browse files
Thomas-fourierstorulf
authored andcommitted
mmc: mvsdio: 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: 236caa7 ("mmc: SDIO driver for Marvell SoCs") Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent d2d7a96 commit 8ab2f1c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mmc/host/mvsdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ static u32 mvsd_finish_data(struct mvsd_host *host, struct mmc_data *data,
292292
host->pio_ptr = NULL;
293293
host->pio_size = 0;
294294
} else {
295-
dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->sg_frags,
295+
dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len,
296296
mmc_get_dma_dir(data));
297297
}
298298

0 commit comments

Comments
 (0)