From patchwork Sat Feb 20 14:29:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 12096881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96A38C433E6 for ; Sat, 20 Feb 2021 14:32:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3BBEF64EDE for ; Sat, 20 Feb 2021 14:32:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3BBEF64EDE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=wanadoo.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=RVJt2fHFEAjsMbEp9ivavKAYtD/MvkxXvhonEteR49o=; b=Pb8z6E6mNcHp+yTcbLZoTmeLC5 RsdI2pkLnQx1v1Q7u/dnbljML3tOWK4KKQLDC+InbtViRSpYMSwZZSfnIohBNWOaUarGtO6rndLfH IFp+8syDTWmxL/7LLx3HBq0sOPBixesrTTRqDMJmKSBQFcPEXG+qfCG97wSoRbnau6Q7/lD1hraDv 6f27AZK5cHAmISjXeWqia1RvYP5cVO4GEQrx8pAzLSVaoCzg3NEnHxn8j18w0vk32EjIWuvH2cC/O nhIqp/v0b7VHzRhjJVInnjCwEOrzQfK621YUzgLVXm93IzNCwGKtaFHv1Ehmkze/nWgpMQoV5qk3i lvE50s2A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDTGi-00036p-6u; Sat, 20 Feb 2021 14:30:00 +0000 Received: from smtp03.smtpout.orange.fr ([80.12.242.125] helo=smtp.smtpout.orange.fr) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDTGg-00036T-MX for linux-arm-kernel@lists.infradead.org; Sat, 20 Feb 2021 14:29:59 +0000 Received: from localhost.localdomain ([90.126.17.6]) by mwinf5d57 with ME id XSVv2400407rLVE03SVwi6; Sat, 20 Feb 2021 15:29:57 +0100 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 20 Feb 2021 15:29:57 +0100 X-ME-IP: 90.126.17.6 From: Christophe JAILLET To: ulf.hansson@linaro.org, wsa+renesas@sang-engineering.com, yoshihiro.shimoda.uh@renesas.com, kernel@esmil.dk, dianders@chromium.org, yamada.masahiro@socionext.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] mmc: uniphier-sd: Fix a resource leak in the remove function Date: Sat, 20 Feb 2021 15:29:53 +0100 Message-Id: <20210220142953.918608-1-christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210220_092958_964741_7D9C4E68 X-CRM114-Status: GOOD ( 18.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org A 'tmio_mmc_host_free()' call is missing in the remove function, in order to balance a 'tmio_mmc_host_alloc()' call in the probe. This is done in the error handling path of the probe, but not in the remove function. Add the missing call. Fixes: 3fd784f745dd ("mmc: uniphier-sd: add UniPhier SD/eMMC controller driver") Signed-off-by: Christophe JAILLET Reviewed-by: Masahiro Yamada --- drivers/mmc/host/uniphier-sd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index 6f0f05466917..ccbf9885a52b 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -660,6 +660,7 @@ static int uniphier_sd_remove(struct platform_device *pdev) tmio_mmc_host_remove(host); uniphier_sd_clk_disable(host); + tmio_mmc_host_free(host); return 0; }