From patchwork Wed May 24 07:53:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9745267 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C3D6C60210 for ; Wed, 24 May 2017 07:54:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4850288F7 for ; Wed, 24 May 2017 07:54:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7CAE288F4; Wed, 24 May 2017 07:54:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0CDA288F4 for ; Wed, 24 May 2017 07:54:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761761AbdEXHyW (ORCPT ); Wed, 24 May 2017 03:54:22 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:35132 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760220AbdEXHyV (ORCPT ); Wed, 24 May 2017 03:54:21 -0400 Received: by mail-wm0-f41.google.com with SMTP id b84so54025634wmh.0 for ; Wed, 24 May 2017 00:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=EEpazQJF6abJjaxLXuX6KlHGeZsS+EyWIMqhd1xJn6E=; b=KSmGCWTigvsxwWXvaDJqgWeUsBU/O6CTSHpmWXhxE9bzTtzUlveJBhC42Cuh4H0brz FHQjoZGaYoUAm/rrGsCIDOZWNKKnoRyIJ4tlsAbOHlcPxY42TlvGRlGWfPAR4kN5h8+v /bWTrJoj9h1jRPkASJLN/GPH2T9KI/lEbmDVL1JJS7XUWXllj8CyihyAQUlzsbVha8cA p6VvLZlQTpf6mbrZmpDCm3bzkXbAYovHR2V2rQp0xJCVZYWtDh/6OZLO7i+B3xEoxEI2 y8u0p91IHyVMa6sCUbUPi5DGQpPCyyaEkwyXY/JS1GPrmdiQgQ8xxAd9tk6C4MSr8L6c IArg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EEpazQJF6abJjaxLXuX6KlHGeZsS+EyWIMqhd1xJn6E=; b=tz0j4JOG4ZP8fbdMVS20HrCjQkjHwCj7WfQbR4iWb7qnYllQ29y99JrKO6kGl1aP5D dlCCar3En0aaSOTiUuDhioj5sVSj5tFqNavtcWTa0IpXiUTZ0D706hacl6pJsPf0aJJ8 kDfeQmHupC/zTzw4txgnNjQDuf3iqsBUQtq33aPNmHPx+/Kcs6eCMGA7FSpgXMy0ZzrP nTNVhuVmAvFq1Fk+LOdrsEOd9PaYKkxP2qEEQkyiPSz8rerjmw722AYRxt8CekZacl6Z M9xe5fy5JWosDD+2Titsu4uy5+i8XUj5eDg8RmOeQhaL9FZENhl3hUkEQ9qIpJagALhs +XNQ== X-Gm-Message-State: AODbwcBK7E8ZhX9zIJlRE405fu/GvDuDc9kTXKgzlZehB2TiSCbkhvsz OU4oIcjM7Q4LOcIS X-Received: by 10.223.179.198 with SMTP id x6mr22690940wrd.167.1495612459721; Wed, 24 May 2017 00:54:19 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id a24sm4224993wra.17.2017.05.24.00.54.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 May 2017 00:54:19 -0700 (PDT) From: Neil Armstrong To: ulf.hansson@linaro.org, matthias.bgg@gmail.com Cc: Phong LE , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong Subject: [PATCH] mmc: mediatek: Fixed size in dma_free_coherent Date: Wed, 24 May 2017 09:53:52 +0200 Message-Id: <1495612432-16669-1-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Phong LE 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 --- 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 5c1e178..5a672a5 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);