From patchwork Mon Oct 24 11:30:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8918 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp434419wru; Mon, 24 Oct 2022 05:52:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4IGgGvnZmyI+naerPU0o7mfesczu/hIruBKlBCOvJPkeUFaGRLX1EA5MLiNTD7dRrGWyyZ X-Received: by 2002:a17:907:3e03:b0:722:e694:438 with SMTP id hp3-20020a1709073e0300b00722e6940438mr28198977ejc.755.1666615932735; Mon, 24 Oct 2022 05:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615932; cv=none; d=google.com; s=arc-20160816; b=upqwJAspgkQM2iNuZT5S+e8SaQB+ZPhy3OPlczD6rCJ2DOsQMoSSYMCUqQzCierVCx Un7aSiCbWs6dX0vHt/3SdA5cH62cn4GMSL78t2vtJTNDt/l2IBQ8mJuIh3WR7ubS7WDi WtjgWgimjrRIqXt3oQJKzlQepkIe93ea/vArZj0PNZX4ARf3pHs0yt0D2XLEJC7TqD9X aqixwUlxmRb6ZWsNJ97t6EgfBJErPWjebPDi0ZHRecaF5egXxQ89nqTQuUgaa/uWUlVD MYxyjfgZXj1WdC5e36ngGJNl2lZCxPVjDoN551M7MRSbDohCOAAgkyXxQJ9LSpwATov6 URmw== 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=2q10K0vzCSjBvKXBjsTsPUvpEJMmXSvyOJnVNgnNsGo=; b=eNWGvp2b15zAWKhfNu8sne8eeiKjuFJ1EIk/2Qqvvg9rD+Bh9E74BQJ540iUD9BGHY dif2jyVKG8H7MFFxK/YgnY6IT2pa5O3tBrvKfSO2xEKcO4LziulrLq9nlS3dW6VUcjlw wIIsDhQ9RL6JML9bRXzfOVLwWqdBlUTwXBCQnkyJ2QMDLkozkNwtudjL3i5+zSsKktDc fWNXg9wRPZTMt+eh0OGOgRlmrPdXhbTFlL/d6rkt5k8GP9CP+T8b9bEgESSaLJXW5vzF lsvjTONZzBeUeqIP2V2he//crDkQ6basQ0LIhn6fKTupsU84z6dvRvFtrnqW4cRKS7pa W6+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Br16Cn6S; 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 qk32-20020a1709077fa000b0077bf109acb5si25662797ejc.116.2022.10.24.05.51.46; Mon, 24 Oct 2022 05:52:12 -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=Br16Cn6S; 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 S234373AbiJXMui (ORCPT + 99 others); Mon, 24 Oct 2022 08:50:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234621AbiJXMpV (ORCPT ); Mon, 24 Oct 2022 08:45:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C8C72872B; Mon, 24 Oct 2022 05:09:46 -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 20C71612DB; Mon, 24 Oct 2022 12:08:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32F7AC433D6; Mon, 24 Oct 2022 12:08:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613337; bh=reVmjF1orNsb6WREl5L1JcF/8r41j2eq9TSpDSt3XMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Br16Cn6SNEiSz5OU16XrhzKDVxfSTD8k6YKP4p2ulsvSfQ1H+fBAdynVEa6cK1crB niNmQG4FxjGpRErQ0MqIND7rnEgQigCcEOE1wST/8hAjij+KoR3LfTwv+IZ3N3RSCt a3Z9kTbIXLaZix7gfJz8Rk+swBuaLpmsIJ1nAgdI= 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.4 099/255] mmc: au1xmmc: Fix an error handling path in au1xmmc_probe() Date: Mon, 24 Oct 2022 13:30:09 +0200 Message-Id: <20221024113005.774025102@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113002.471093005@linuxfoundation.org> References: <20221024113002.471093005@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?1747573468465348170?= X-GMAIL-MSGID: =?utf-8?q?1747573468465348170?= 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 bc8aeb47a7b4..9c4a67f4195e 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -1116,8 +1116,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);