From patchwork Mon Oct 24 11:30:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8723 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp423570wru; Mon, 24 Oct 2022 05:25:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM580HN35QUSPBPIF+2NOw3YO6qGM3FiY4FG6/UNcRkHYJAwd+VGy9MPS1Yf/eUUvm/vwuv1 X-Received: by 2002:a63:87c7:0:b0:434:883:ea21 with SMTP id i190-20020a6387c7000000b004340883ea21mr29078114pge.152.1666614318175; Mon, 24 Oct 2022 05:25:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666614318; cv=none; d=google.com; s=arc-20160816; b=ZYZ9oTVuoCXWthjwpx1yKpEZUkMkNkIq20sjm4bBEM4knCQcbBO0+Scrz+MRIZtIyP gEdMSC2Em6w/OoJL5eRaFeg3qJYvPEo/zT8UUuRJBatK8TFc1vGRInVSDayQYNS/nrYR UvnZFxziFjB5w0JOLvntNFdo9AbaiStNXeyDtqQdFgs5CvnIcDZWhdESlyoaSFwV+soG Hr8FZwgXBV9s8EJkPi4kuXbISG5pCwrwbHleQBPCminbMEa7N1b5cWovESaXUqwxGEQu A+QHGAziyfrB6m9GLNu9IgLl1mg73isa9PAkB4BFUNgLJPF0MW8l+FMCm6cFFcoWQGa6 1dCg== 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=+RNesLNXRbgmskFIticWAXqVdCjKgko0r1B1h6YMwcE=; b=L7OaD8URcN48l42FNuUmxiTXuaDgbvs3CeZ7ikPt2RH+RLGAOPZ5Qf0Kz29SMF75xa NVOaF77xSHH1qM84T+slbEm6J1p4eBWWq0hu/QVUVJzjn78WjBcq8cqxcXsZ+vBpHnv5 C6y3g9BumtKFjVWtioln55P3Xja5XrMcI8BEwuvKvY6kXHGWTJb54XzV6eDo/iSbZHTz SI2Wku5Y3aJ7+VVNuNQgHqwn4aQUwLNhXigz8p33i4bg3oHmn4no307WjV8OoDCEla3k GzYRg8gXFe2D5Y8jCgx6ZrsE+wlxmp2ShSD0I4SJsVoHbR4mtpPen/7rnVJPXplFmqtt WgDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bPNULyzw; 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 i2-20020a17090332c200b0017ef8bf8a91si5925392plr.439.2022.10.24.05.25.04; Mon, 24 Oct 2022 05:25:18 -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=bPNULyzw; 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 S231732AbiJXMYo (ORCPT + 99 others); Mon, 24 Oct 2022 08:24:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233545AbiJXMW4 (ORCPT ); Mon, 24 Oct 2022 08:22:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25EE610FE0; Mon, 24 Oct 2022 04:59:27 -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 0ED7461218; Mon, 24 Oct 2022 11:58:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FDB8C433D6; Mon, 24 Oct 2022 11:58:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612735; bh=a0S/cn9APxnABm6M14xkKN16ST3BLbmCrmr8rksBOQ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bPNULyzwpgWaqWyN0g160SAiXkKagCfQZRmYNN0kWgASHkTS4z0OHV20r0QI6ZajG Eh1t3SljyfM6ANJUu7eA4smXH3SIkLIM4Mh3nUVqA3OdrBvhcjIPf7qAZ+dpsfL5U2 o+d7f3wjACHf2HbqCf1f/rYz/lmvPecI5Ax+pyKY= 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.19 100/229] mmc: au1xmmc: Fix an error handling path in au1xmmc_probe() Date: Mon, 24 Oct 2022 13:30:19 +0200 Message-Id: <20221024113002.264867674@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@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=unavailable 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?1747571775722034054?= X-GMAIL-MSGID: =?utf-8?q?1747571775722034054?= 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 9b4be67330dd..7cd0551aec78 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -1118,8 +1118,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);