From: Phong LE Date: Wed, 24 May 2017 07:53:52 +0000 (+0200) Subject: mmc: mediatek: Fixed size in dma_free_coherent X-Git-Tag: v4.13-rc1~179^2~42 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=16f2e0c6ffdfaf964bb0a6d5e67253a1c8116f0e;p=karo-tx-linux.git 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 Signed-off-by: Neil Armstrong Signed-off-by: Ulf Hansson --- 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);