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: 9745273 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 6894260210 for ; Wed, 24 May 2017 07:54:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B7FA288F4 for ; Wed, 24 May 2017 07:54:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F77C28900; Wed, 24 May 2017 07:54:55 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0AE9C288F4 for ; Wed, 24 May 2017 07:54:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=Kb2ExZA9kqlhlJLbjMo48bQh5uADMtZ6/7ZMTarvQvQ=; b=Qpf pubN7G/rpbVQqxMT0p0qiZ4d85QDjmYvc5Roz7IUz7RoxdJ8zJiKC0Crk2CJVfJRHRnud39lBF1jl ubUfOqwQH95cjJc8YsE4toX64OUPnAegZHWWj3uru30ZtS3e4GSc176diTVlc+DWdZuUos9xVn463 rSeeQV9Z0qkNUnlvuBgc9tu3el7QgtdujpmX5kzMpGGSUz4PVexcFoBRwXeasQp40ebf/rH4n29gn tApvN4vatA9zf+0B1V+HynN4zwEv3M0XZ9WLpEe7NV4tF6e99megVp3lAqWYBdggvpP7kdUCIhcpq jJWHdIjGrskNzM5BfWEEwNCAagr7I8A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dDR8A-0007T2-35; Wed, 24 May 2017 07:54:54 +0000 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dDR7x-0007GQ-QN for linux-mediatek@lists.infradead.org; Wed, 24 May 2017 07:54:43 +0000 Received: by mail-wm0-x22d.google.com with SMTP id b84so54025633wmh.0 for ; Wed, 24 May 2017 00:54:21 -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=eC9hoGyxDWTWgPQVHTS1jwgS1uR4Px3KeAvXywk/y/ZZzJAhn4w26So3OnCwbijEqK WIo55pnIhjBaV/PbH9BpWi2Y5Qj92R2oVHoI/9flybJwyv32+zfCtz0NFdO2ZjF2gNc0 lq+LXtPwiV1YCUC+Af8bsPW6HWCrtqMYLXCp5N8/3yoaSrKwA+hGzD0dVY2FUrdQJ4mj a5pZrPpo/TSOSIk2zcogfb4zjxwxkP6TWafTPVqOuDaI7SMf0cWLpqMT6r9j2DrVqhnx pDK5Vi1iqy6ZrZWSuxl5gqxl8AScAPDvG0FOhJePW00hOhrzhVPbUacTViH2jX2gWw30 eSXA== X-Gm-Message-State: AODbwcChixV7S2I7OyJMJi17hITsZvUUuHm8yu7Bz+cZA8CrAfF15xCd rGwZ3fpVgGwT/QZh 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170524_005442_013619_DE970267 X-CRM114-Status: UNSURE ( 7.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Phong LE , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.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);