From patchwork Mon Oct 24 11:29:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9112 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp456124wru; Mon, 24 Oct 2022 06:33:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4zkcyCYnRSBJreE1YOnYSaSmjGxITjQpilRhV573TGfhZHy+HviXbcjEqTVbh4V9ucexvu X-Received: by 2002:a63:d1b:0:b0:42b:828b:f14a with SMTP id c27-20020a630d1b000000b0042b828bf14amr28728243pgl.235.1666618417228; Mon, 24 Oct 2022 06:33:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666618417; cv=none; d=google.com; s=arc-20160816; b=MFTDrm3ZW/GwgpvLvrw6MSvVmyv/B4lr3F4VMnpxvMSAyb3UQjJQ6OqWzhvjdUY9/D /TOIbdfEl/vw6Qc7NpacgmP2NJoSlQ/ElbUGqw7+3rf+G37QInWhbcWLpZc4fm4/KLMm AsL2yQEZjRiAvqVXNuB9dSVnVM5N+xrj8TBVuxlCJ8tXVZMUpRp5dnGYJcPViamgqQEP A64YNrkY9TiZ6GCBenVGjmCvrQBMTq74ySWjOrm+Mpfa9awl4JTqGF2ANIMnT4xYQd/R gq3wcH/wQXfJMy2MFAaGdfH8ereYIhAHwWoaDgPbpFH2BSrYx1A+QQGX6Eb3nXCAbHlN piyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8ehNS1ptLL05Y6Yg4fznQ0A3GNUxY6c/ZUu7V+Jv+wY=; b=SaVn2xCO+zT+OOW98MZi4lhyk1dhyevj6UbH3j1Cyw7mjOT3VyTJTgOXQ1Uan0rZ/t xTHAAa5rSq1eLt2kPKiPqLdoI9OJ0zDDozbsQiGVe/ARgSHHConWezGMkm8OaTJ9swxB m0FcHFgvobrCT5mnbR5yoM/BolwlGY0ZGfHbv3N1ydTuxLA5HVEFUZH68TlFeArZ2Fqo hqSRrReVcd39yVNsfKnTsU3lR0L9hzUv7D689XhdtrRuF8tLpdjF0tJPgWp4h1ynim6p IyT1FF8+ZE+hyCkEC2sF+qyQAq/tjXuoeOvp75OhQ5drnpZ/LjggGdI4BAujkSHC2Lm0 gKyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IwtxEb9s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r22-20020a6560d6000000b00462fbd5b46bsi31870871pgv.35.2022.10.24.06.33.23; Mon, 24 Oct 2022 06:33:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IwtxEb9s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231655AbiJXNRl (ORCPT + 99 others); Mon, 24 Oct 2022 09:17:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235914AbiJXNRE (ORCPT ); Mon, 24 Oct 2022 09:17:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91CD8A3465; Mon, 24 Oct 2022 05:26:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8299F612E1; Mon, 24 Oct 2022 12:22:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 951EFC433C1; Mon, 24 Oct 2022 12:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614169; bh=lF6ikwfS09Vqb7bDreozm3jZplO8R39vXqkubMiPaoI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IwtxEb9sUYxYIZILn9H769LBB0k6FQKTG5cCu91Zp1S6TPWZk5veUydp+VrHx1OL1 irvUrJxf5pENvpOaAdfxM/GGGHPSVPxFa9kL3ymAOguwduIZfO5+xQ74VpZeK7PQeb 0xbC5tLgpTkAB+h9DAkvInphbQCeaPaEtYpTNwtk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Ulf Hansson , Sasha Levin Subject: [PATCH 5.10 159/390] mmc: au1xmmc: Fix an error handling path in au1xmmc_probe() Date: Mon, 24 Oct 2022 13:29:16 +0200 Message-Id: <20221024113029.469146107@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747576073887137273?= X-GMAIL-MSGID: =?utf-8?q?1747576073887137273?= From: Christophe JAILLET [ Upstream commit 5cbedf52608cc3cbc1c2a9a861fb671620427a20 ] If clk_prepare_enable() fails, there is no point in calling clk_disable_unprepare() in the error handling path. Move the out_clk label at the right place. Fixes: b6507596dfd6 ("MIPS: Alchemy: au1xmmc: use clk framework") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/21d99886d07fa7fcbec74992657dabad98c935c4.1661412818.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/au1xmmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index bd00515fbaba..56a3bf51d446 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -1097,8 +1097,9 @@ static int au1xmmc_probe(struct platform_device *pdev) if (host->platdata && host->platdata->cd_setup && !(mmc->caps & MMC_CAP_NEEDS_POLL)) host->platdata->cd_setup(mmc, 0); -out_clk: + clk_disable_unprepare(host->clk); +out_clk: clk_put(host->clk); out_irq: free_irq(host->irq, host);