From patchwork Sat Oct 22 07:23:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7405 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1097312wrr; Sat, 22 Oct 2022 01:07:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5TY08l0HjNOVOPbx3FZMFvJ3ZaYBYLKSlVs9FrESBqr4cGSBqcwJtVqsg31BVVCTYxuNoN X-Received: by 2002:a63:2352:0:b0:46b:1dac:bc83 with SMTP id u18-20020a632352000000b0046b1dacbc83mr20233821pgm.98.1666426043460; Sat, 22 Oct 2022 01:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666426043; cv=none; d=google.com; s=arc-20160816; b=HKz8ac1Cyd3cFqXaxZpsVfTrdckgV0/wrVUB9d5WMJsyDtyrKS3aAi+ZQ9EWy11ti9 pKNwJDhUjPeWASYvTXR2GXa3PV8sJDbLAka8n1UlIZbFH41Zv4jIqtuXrhpfO5w9snRV E852jQwo5H3DVTd2XX9VDtC2+XmrH5vlN0J3iGX88vLrWQeaAr+s8OyzNau9uQANQzLP lqR2p3UJlD4aY5rtEZmM8luYVntcGX8/2daINayaVdw4ysYCCHbMnIj0sTZC/jnRcSvg 63natQMaXsVkRaQUjO2WcohPikJ+bBF3lOhfTfQTJB2SPv0yI0GI70QsgEqZ2gCs2MGz 0huw== 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=bhfeHdcLyIhjUKIk7+Ov2gLAUW8A75nu2C7dZ41/+m1eYI+IkS8BQilbANdimRwpXP ko010ptArd9GJAA7KMEgnvH+cbpla/o/9v4WDxcXGAt59AuvbplfqG4sas7TJJJ1Gwrc HnxNNLlqEawNxvP/MZbi/UqIN9NEgEaeLx5jFt9OA/WWx+EJAAjrH/JXG72MiA0jE1Kf B+xyF8O7aBFXTaLDn/Jx3Eksqi6XKi1d5IAN6+au43BidI3aM6GHofsoL1zecBqSBEc+ LC+fuGyttY0DhIf+KRIAzmwIMOd6DBFN6wvdzlHGGArAkhtcmvXuUTD821SmdIN0dHtl L53Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GmG0glR1; 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 h11-20020a056a00170b00b00565cb1ebdbcsi30632155pfc.277.2022.10.22.01.07.10; Sat, 22 Oct 2022 01:07:23 -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=GmG0glR1; 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 S232618AbiJVIGp (ORCPT + 99 others); Sat, 22 Oct 2022 04:06:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232911AbiJVIAP (ORCPT ); Sat, 22 Oct 2022 04:00:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 772AB24CC04; Sat, 22 Oct 2022 00:50:25 -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 2EA27B82E1F; Sat, 22 Oct 2022 07:50:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 770D8C433D6; Sat, 22 Oct 2022 07:50:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425009; bh=CUPY4O+CKLsV9H/zO+hL/T9LV5w7NgSzOSfvf/6/Fb4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GmG0glR1fNnxIvvic2W+CF0lTjwWqEmxdARaXoOYY99nWB1YXHGXwrYGvVFQVwtJF fKzPfCJ7cox3p+ZwnFUkeH1gjPGL9OAtP6+6zhs5Tq8G6CuTuyz+vxMue2dTDipNIn hlbdmYotJrCJxy8AKrw7u2SB7Tz/7AXfA08PC3T0= 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.19 328/717] mmc: au1xmmc: Fix an error handling path in au1xmmc_probe() Date: Sat, 22 Oct 2022 09:23:27 +0200 Message-Id: <20221022072509.354373855@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747374355031956342?= X-GMAIL-MSGID: =?utf-8?q?1747374355031956342?= 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);