From patchwork Mon Oct 24 11:29:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9008 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp440602wru; Mon, 24 Oct 2022 06:04:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM50DIVam6sGgxiFaZAjqhJpoLQbJZMpEZhQKfeyR9OjDPVLdVJZlrCHKKlQ4JwZhFtnWSTD X-Received: by 2002:a17:90b:1d0e:b0:20d:a61f:84b1 with SMTP id on14-20020a17090b1d0e00b0020da61f84b1mr65344051pjb.172.1666616671759; Mon, 24 Oct 2022 06:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666616671; cv=none; d=google.com; s=arc-20160816; b=PMMm75gO1Zb7Pt3kTNGn9iv4smy5L31eyLbzRVbhCwnbi83nSL5cqDDhGZqvaiFmBc Nh2ugQx/GjT4YuvIwZtA+4Ttxxce0zCpxT8h2d49kQYyDmb7xOXsFGpdVtZYtVbna4DH zhS4i3pdFQgUOu54LfTg3ZlfoamQqfcUrGWM6BccYBsNLAU4/k3thuTzmKd2LHHFKJGK nI/RLT3tkAce0kOW/dIXFRRMTILzHF46PWguyncFl6UC6iaj0cypzv03pr9MetsUBkbp CPH1hLORDsO4X2bkeA85T91ql6Nlmwg0sWkhC5nrtrSwGD9LnXkwEL4mYI82vd8Gwgfu a4qg== 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=I2a6497Yat8D57tcmSRLnI5CdPkfXXWQX3Fa35zmacs=; b=XR/f0OAHEP1G6KSyQL/cM66DZZwsn04OjjdmMxBaEeHJwn8KjOCgzUusmk/2xpWoyG JR67JJcSkG3ATCorRoPSksB052ABYLGp2SM8/AdLeAhyj92eq66ICHJsIBVIDvRjF9lh ExuUis5DssY39MqIzdQYXe0PS8zj0827iyvgcLAjyzv9b4Upjf/w69q1SMEYSQcUHaE/ 2yVrcocKFEwKEQyqMFL5cL6MKhKuDrIuyz2XVDSKYCHW+WPK58Lk7nbg4sgNioAURH+a gQk2Q+h6IOeWGvriwuCa6OZDr+xPbZKu3Cf7sfKfON4VfUCOwU5wwy/i7566ZCDvHKZq ZUxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QvMXN0Zi; 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 73-20020a63064c000000b0041b86985526si28298950pgg.189.2022.10.24.06.03.51; Mon, 24 Oct 2022 06:04:31 -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=QvMXN0Zi; 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 S232261AbiJXNDZ (ORCPT + 99 others); Mon, 24 Oct 2022 09:03:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235258AbiJXM7q (ORCPT ); Mon, 24 Oct 2022 08:59:46 -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 F05A48274E; Mon, 24 Oct 2022 05:19:08 -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 42D46612E7; Mon, 24 Oct 2022 12:07:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5347AC433C1; Mon, 24 Oct 2022 12:07:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613258; bh=xk1T27BF9PaH7xxK/iE4NlW4zOBlJKTpUnWvV3WYC5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QvMXN0ZiLp5lySt3PAC/4qoalIqqd2iStlx2ac/bGve5xdLgYH6VdCEMiC1GEh4n5 xBnfhvOTqj3axIa59yEbb76LXFyalkHjZWRvp9mDVto0BpY17czZ7mxaW7zopG2T9m 7og3V6j6iCK5s2a5vjN8K8owjuCwzJqbDKMeN9ck= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xu Qiang , Mark Brown , Sasha Levin Subject: [PATCH 5.4 069/255] spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime() Date: Mon, 24 Oct 2022 13:29:39 +0200 Message-Id: <20221024113004.816616499@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?1747574243618234974?= X-GMAIL-MSGID: =?utf-8?q?1747574243618234974?= From: Xu Qiang [ Upstream commit 494a22765ce479c9f8ad181c5d24cffda9f534bb ] Add the missing clk_disable_unprepare() before return from spi_qup_pm_resume_runtime() in the error handling case. Fixes: dae1a7700b34 (“spi: qup: Handle clocks in pm_runtime suspend and resume”) Signed-off-by: Xu Qiang Link: https://lore.kernel.org/r/20220825065324.68446-2-xuqiang36@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-qup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c index 6da49705a10a..ead6c211047d 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -1199,8 +1199,10 @@ static int spi_qup_pm_resume_runtime(struct device *device) return ret; ret = clk_prepare_enable(controller->cclk); - if (ret) + if (ret) { + clk_disable_unprepare(controller->iclk); return ret; + } /* Disable clocks auto gaiting */ config = readl_relaxed(controller->base + QUP_CONFIG);