Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 236caa7cc351 ("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>

authored by

Thomas Fourier and committed by
Ulf Hansson
8ab2f1c3 d2d7a96b

+1 -1
+1 -1
drivers/mmc/host/mvsdio.c
··· 292 292 host->pio_ptr = NULL; 293 293 host->pio_size = 0; 294 294 } 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, 296 296 mmc_get_dma_dir(data)); 297 297 } 298 298