Skip to content

Commit e650c91

Browse files
Thomas-fouriergregkh
authored andcommitted
mmc: mvsdio: Fix dma_unmap_sg() nents value
commit 8ab2f1c upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9da9d29 commit e650c91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)