From patchwork Sun Mar 6 17:44:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 12770781 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31A6EC433F5 for ; Sun, 6 Mar 2022 17:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=+lUxLorzTo5/PJjgPaF4Aifbu1sn7HnBe8f7DEV1Nu8=; b=bbblNW3HHjMgrv wx2/lx7i0+aMzPHtWzAF7NFD0T/lGav+m1eK62fNta26cqOqxI1N+OBUGAg94raNtKG3h4DuD5McF ER7RS8RV+ykigK4IH+GT9mFTKOzCp7HdKFSsqXYHFAPDJFT46VPfv1jD44Dqdlt9Yaa/xevc1HKRk 84B3l6eDmSed+3mPEp8VcmlLWUZrXV61/37p26bjrEKfrQb5tcfB2iJH5icKuOfcUjM8qGKijnCID ef+AnqRLP4LQQeC7Qp0SbYFYyJCchP8FrzTk1poLFEtxNEw/htWncGL40Dr1+ZhYbqib37Ym0GxKd rc0vUtzgwnUIzBvijLCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQuwP-00F6e8-Ay; Sun, 06 Mar 2022 17:45:09 +0000 Received: from smtp05.smtpout.orange.fr ([80.12.242.127] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQuwL-00F6aQ-Oo for linux-arm-kernel@lists.infradead.org; Sun, 06 Mar 2022 17:45:07 +0000 Received: from pop-os.home ([90.126.236.122]) by smtp.orange.fr with ESMTPA id QuwCnSnHcqMVEQuwDn0HmW; Sun, 06 Mar 2022 18:44:58 +0100 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sun, 06 Mar 2022 18:44:58 +0100 X-ME-IP: 90.126.236.122 From: Christophe JAILLET To: ulf.hansson@linaro.org, cjb@laptop.org Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] mmc: wmt-sdmmc: Fix an error handling path in wmt_mci_probe() Date: Sun, 6 Mar 2022 18:44:56 +0100 Message-Id: X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220306_094506_003788_D7D19BEB X-CRM114-Status: UNSURE ( 9.08 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org A dma_free_coherent() call is missing in the error handling path of the probe, as already done in the remove function. Fixes: 3a96dff0f828 ("mmc: SD/MMC Host Controller for Wondermedia WM8505/WM8650") Signed-off-by: Christophe JAILLET --- I've not been able to find a Fixes tag because of the renaming of function and files. However, it looks old (before 2008) --- drivers/mmc/host/wmt-sdmmc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index 163ac9df8cca..8e18f01c0938 100644 --- a/drivers/mmc/host/wmt-sdmmc.c +++ b/drivers/mmc/host/wmt-sdmmc.c @@ -863,6 +863,8 @@ static int wmt_mci_probe(struct platform_device *pdev) return 0; fail6: clk_put(priv->clk_sdmmc); + dma_free_coherent(&pdev->dev, mmc->max_blk_count * 16, + priv->dma_desc_buffer, priv->dma_desc_device_addr); fail5: free_irq(dma_irq, priv); fail4: