Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp898956rwi; Wed, 19 Oct 2022 04:29:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7vMZULZZHLxVd1O8GjXoEN27n0JIErCYy3Y84aTYqxuOz4oLBwxYyMF98ZhjwYQoCeHFTt X-Received: by 2002:a17:90b:4a90:b0:20d:5c5e:1622 with SMTP id lp16-20020a17090b4a9000b0020d5c5e1622mr45382334pjb.50.1666178999385; Wed, 19 Oct 2022 04:29:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666178999; cv=none; d=google.com; s=arc-20160816; b=Qf2XucVVUuD0baCTkiYo+29HdX36pLYxOv7m6VGAyaJICGCXxprOd0JcPbDGI5qGie t4bqunpd1d1iG9Oalz58LDQ5se0zu3Zx4QHoraTBp7iitickgt6oRkkAIn3pEO8Yqn5Y 4qLP6hsj2+GCAqg2bKHIJCbEXhEXygr+xOBsP/4NrQ1/x8XnRyRIZhJ84OeS11JGxbNR JCdJQ3PRyTA8TcPgR/71v/cjq4KO1+uIn65Uq2pReMXqzzni63kexy2quQ53JENDJi9I zK7zOOVWp6U49C13rU+K5I0awIcM9Civ8HfMXUGcw9W5I3dotC+czP4RiqMDxeqcDV8a A6wA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g18-20020a170902d1d200b0017a0ecb4fcesi15191391plb.383.2022.10.19.04.29.43; Wed, 19 Oct 2022 04:29:59 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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); -- 2.35.1