summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mtk-sd.c
diff options
context:
space:
mode:
authorPhong LE <ple@baylibre.com>2017-05-24 09:53:52 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2017-06-20 10:30:31 +0200
commit16f2e0c6ffdfaf964bb0a6d5e67253a1c8116f0e (patch)
tree26a02ed9fd1808fa8656817570468f6027cb9006 /drivers/mmc/host/mtk-sd.c
parentmmc: bcm2835: fix potential null pointer dereferences (diff)
downloadlinux-16f2e0c6ffdfaf964bb0a6d5e67253a1c8116f0e.tar.xz
linux-16f2e0c6ffdfaf964bb0a6d5e67253a1c8116f0e.zip
mmc: mediatek: Fixed size in dma_free_coherent
The dma gpd dma_free_coherent call size in invalid. Fixes: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver") Signed-off-by: Phong LE <ple@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to '')
-rw-r--r--drivers/mmc/host/mtk-sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 5c1e178fc5f9..5a672a5218ad 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -1774,7 +1774,7 @@ static int msdc_drv_remove(struct platform_device *pdev)
pm_runtime_disable(host->dev);
pm_runtime_put_noidle(host->dev);
dma_free_coherent(&pdev->dev,
- sizeof(struct mt_gpdma_desc),
+ 2 * sizeof(struct mt_gpdma_desc),
host->dma.gpd, host->dma.gpd_addr);
dma_free_coherent(&pdev->dev, MAX_BD_NUM * sizeof(struct mt_bdma_desc),
host->dma.bd, host->dma.bd_addr);