From patchwork Mon Oct 24 11:30:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8620 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp420222wru; Mon, 24 Oct 2022 05:17:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM61miipiZia6VvMlakztGUCY2/RmPZ7/PEv8YUnGrQuUCDSzRcuT+QLFONuGQPqaDuFo3WM X-Received: by 2002:aa7:8011:0:b0:567:70cc:5b78 with SMTP id j17-20020aa78011000000b0056770cc5b78mr29208882pfi.29.1666613868342; Mon, 24 Oct 2022 05:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666613868; cv=none; d=google.com; s=arc-20160816; b=aGE8XEYObXGfXhLYQN7qja47beyFVJ4WEArGUUpPzzmEMiOIt4lAvMdHdZGz9Ehd9M /9G5/O2Iy9podQREob9VvjnzZzKDDVXduSSCZ/lPaB+G4f7I8bGtdcDNiwIDml9Ry81O T1sWCLj9Su0ird7sJMDPOZY9rDLRQ31J7yK6ilFZ+diczE/uF2EEKP6w4r0GUBW5ULrv 0WRJ3sVFsHFzLqpdq5kReg/sVnieCvYOxXwfbZNXwbCWWmNyqhq0HOgdTWki0hWxS+PC 9auuCYkSv/5FnrNxYyemZ2/Lw5sGW0MwvSTAPNqNU5JVyLHzJvsy+QrorDAkz/hc5G3Y Gj4Q== 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=dls44MZfRKxjDpYHgNqgY3mFJmiobBxL0npDJkJwk9w=; b=vtVOmdLDyRxK7X1zu4qebk44PKpjmvKgTvgy0B++yrminvSMqvDmgfo59VsvFNXf86 MOGnL7nmgLq4uOHCvkCHmgyHvXbBfk/1HNqiMaFGzlO7+tb9CFzEw5a8+Z/7lx1bSLil fPY3LOk6wHaSSOfs/D28Jyt4gOT3Sj83fxTQVIdiTa0galwnAbizp4Sq4FzJl6dQKjEv Ds0s8TtqRghIh+lMakUGoAV+2IDWhvz5iWS9zS0j2xRWKPWMVhgORzWMdK+mUdLxwdk3 yOKRtTAhp00BGvSEqGdieNE0ZFegodrIUAWO1dk1PgQ6A9Kg/zrvlhYlkR/3hsq4qgAZ +j0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WvxwOccx; 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 g1-20020a056a000b8100b0052dd9f10a47si37247997pfj.363.2022.10.24.05.17.35; Mon, 24 Oct 2022 05:17:48 -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=WvxwOccx; 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 S230180AbiJXML3 (ORCPT + 99 others); Mon, 24 Oct 2022 08:11:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233224AbiJXMKA (ORCPT ); Mon, 24 Oct 2022 08:10:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E74408048B; Mon, 24 Oct 2022 04:53:33 -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 6B8E4612A5; Mon, 24 Oct 2022 11:41:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B01CC433C1; Mon, 24 Oct 2022 11:41:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611707; bh=0uWZkCQZvSSzBLwJUw8HecZ+r/KnHBzmlr7A/oiemN8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WvxwOccx9LgSIeKXzrCOTOUd8IWGcHiLo68I2CWRqd95FDht2qRgvhuMm+eP3StH9 6mDtXi5i4oJoLYfQB8ysx/W4X8/Z9QZW35Vc1Z69w5FRKpS7aZfAzn1+Jp+lnpLP7f FHOogEP9B6nbgr8QyWszUGbS1FYgKztulLdG1QA8= 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 4.9 079/159] mmc: au1xmmc: Fix an error handling path in au1xmmc_probe() Date: Mon, 24 Oct 2022 13:30:33 +0200 Message-Id: <20221024112952.321846081@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112949.358278806@linuxfoundation.org> References: <20221024112949.358278806@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?1747571303720265560?= X-GMAIL-MSGID: =?utf-8?q?1747571303720265560?= 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 ed77fbfa4774..a1667339e21d 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -1114,8 +1114,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);