From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-cys01nam02on0100.outbound.protection.outlook.com ([104.47.37.100]:40736 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756659AbeDIAgD (ORCPT ); Sun, 8 Apr 2018 20:36:03 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Phong LE , Neil Armstrong , Ulf Hansson , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 051/162] mmc: mediatek: Fixed size in dma_free_coherent Date: Mon, 9 Apr 2018 00:28:19 +0000 Message-ID: <20180409002738.163941-51-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Phong LE [ Upstream commit 16f2e0c6ffdfaf964bb0a6d5e67253a1c8116f0e ] 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 Signed-off-by: Sasha Levin --- drivers/mmc/host/mtk-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 0bf0d0e9dbdb..f701cbac2061 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -1626,7 +1626,7 @@ static int msdc_drv_remove(struct platform_device *pd= ev) 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); --=20 2.15.1