From: Vernon Sauder Date: Tue, 30 Dec 2008 00:21:28 +0000 (-0500) Subject: pxamci: fix dma_unmap_sg length X-Git-Tag: firefly_0821_release~16425^2^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c00a46abd4d45a67ff62f4ff6d4f839dff38b877;p=firefly-linux-kernel-4.4.55.git pxamci: fix dma_unmap_sg length dma_unmap_sg should be given the same length as dma_map_sg, not the value returned from dma_map_sg Signed-off-by: Vernon Sauder Signed-off-by: Pierre Ossman --- diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index f88cc7406354..3c5483b75da4 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -283,7 +283,7 @@ static int pxamci_data_done(struct pxamci_host *host, unsigned int stat) return 0; DCSR(host->dma) = 0; - dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len, + dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, host->dma_dir); if (stat & STAT_READ_TIME_OUT)