From patchwork Wed Oct 19 08:27:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5035 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp246778wrs; Wed, 19 Oct 2022 03:39:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4YWRLXrNZ0rKrt4nOXoC3PWCSCmCmeP9AcyNKUUCV4Ayoyoownxf2uJZfxorJWhGnRiSbw X-Received: by 2002:a05:6402:400d:b0:45c:9a5c:444a with SMTP id d13-20020a056402400d00b0045c9a5c444amr6679000eda.283.1666175947971; Wed, 19 Oct 2022 03:39:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175947; cv=none; d=google.com; s=arc-20160816; b=Bzd20BrpvTHtOJhOoOYkSmxIiAuIux3YjJOdJ7s750DJ2jY80q2kzHz3ToUDu6PVRd a2gMLd/QkqktrVT6KEeRbjVlhnLXtigbORVVhiSsRwvHfRXpDtHaCaEPVhbFPygQtoOu 8z9kzrZZ8DZZCAz4HV0vfEenPmXiZtrzti8+Yr29dGIRUyGgz43bVy7++wzZoA/B3odS wS/xq/+rj5+TAsgzZC0E5Lb5gev4UYwwxEwnHPb31pR6FYm95DW7cSuDVJzOloncN0ce lG9i5ah0FxPLbKfr4nf6NjxT1F5QJ8MW9PzahTlTlwecS5q9TTp/jDn/3td2C53xYL6n AlgQ== 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=U6nWnqz9KWoXfskAhzpsF2EhfEB0Sft67m14RPU65sg=; b=fPr55BRekXfiD1efLUDxZNJKwpENmuqeimpUBgQmKGqrjDYK7/ttwyVaVASKzmfvzt 5gzYyTBea2XUW8Hd5HNOwA4XKcdc9wFYm7sdF1RdJSw71f5tD7t3tAnxKoGu9uN8/Kha 6YcqWv5e5cySGAvnev9YxL7nhGlQTOY/IBYzbo1a4XNgZJu7q2KNHv8deTbnET0GVZL0 pVh+WSSkl0qglEb3GFnxnFSosc1Y25YOZ95n3qyPtdPWtlzj9CYEEeD+k8yd4mWVLfw2 0Cx16uvH34yO9Mu4oEkAYvtPp1uErKjseXBmTJ0vwhaFsog3UV7PllSf/DEI+fx/pc/j QDcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="HO+5ne/a"; 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 w23-20020a50fa97000000b0045853b3a802si12738258edr.605.2022.10.19.03.38.43; Wed, 19 Oct 2022 03:39:07 -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="HO+5ne/a"; 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 S229508AbiJSKhs (ORCPT + 99 others); Wed, 19 Oct 2022 06:37:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231401AbiJSKg6 (ORCPT ); Wed, 19 Oct 2022 06:36:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2067D616F; Wed, 19 Oct 2022 03:15:48 -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 ams.source.kernel.org (Postfix) with ESMTPS id DC579B823DF; Wed, 19 Oct 2022 08:55:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EEAAC433C1; Wed, 19 Oct 2022 08:55:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169737; bh=CUPY4O+CKLsV9H/zO+hL/T9LV5w7NgSzOSfvf/6/Fb4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HO+5ne/aJePTmAcme+hgr9D8YnqsLcX3s+yTxx+q6I/syTNxZks4jvJnXHEdraJvK HpKXfOcrtiCyhIJn150znpqsgJZj2lkT9lR9ZY/IGqQjL3y4GiYnsNfsk+c4MhLSBt AWuAbuMO0yf7dyuf8WIZKWPQqA8tf/R5ktE5Mclk= 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 6.0 390/862] mmc: au1xmmc: Fix an error handling path in au1xmmc_probe() Date: Wed, 19 Oct 2022 10:27:57 +0200 Message-Id: <20221019083307.178846774@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747112111134856995?= X-GMAIL-MSGID: =?utf-8?q?1747112111134856995?= 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 a9a0837153d8..c88b039dc9fb 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);