From patchwork Sat Oct 22 07:21:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7301 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1093144wrr; Sat, 22 Oct 2022 00:56:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4RKzKs8n+T48i8j/57QSKyuYTrf/PE5Un7eFa/IUmcLA5cOaNdS2f2eJ1yj3LfCKelval4 X-Received: by 2002:a17:90a:cb8c:b0:212:eba5:a143 with SMTP id a12-20020a17090acb8c00b00212eba5a143mr638822pju.79.1666425369708; Sat, 22 Oct 2022 00:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666425369; cv=none; d=google.com; s=arc-20160816; b=MUHhCbA5/QLKuE0nF3MXkl8xjndfsZUJa4juXjoj+DcTZXv9/XytAvMXBJmCYOhXmM 15NPBwuXowqXI2cEvmAY92nwk1uxV0p6RYWDhBOH+sFwjvE97dxGvrtWZMljyQC+Un6v GB14mqWCJ1NIkM65cutQlA+K8fGzuKpe/RyS5RhUp66J9f92LoZhrsmdrmujUt0nYJEd jWH6qycyhCKsBdu5e7jWTr1cALmEm9rcqgnwc6Cc3gK052RAsJJiOF5JVbs6H3qzCzvh ye3QSoTE2Co0ASAh0uEsvIAm56c+rC+1QKU/eFuuAmUYP8mKm+M2ei4G48TqDdatpVxP xyzw== 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=Kf8t6uvex/h0oWfv3hpGINwdDDQvwzqtBEQquqgdTqQ=; b=vhsBuEjME3NOVsvc6ViVfAwU7Z+iYCY7onZrCcwIN5CEmxWSxRDm34XLJ3p86aAYUM bNfTLz7R+xltkpEZr3aW97x5c9xcTXx1XV+CQx6E8D9v41EfyyX2W7GFilsr4w/+uNCF 6ccGBbl4MOdyrP4A9ISPg4VrrcTjL5HjrMhJYbJ0BVsZtnXDfyzAatBXMDBefhwkOiyH uoR/WR6XlMvs1r6tmEIWE8ALiOkBJYP5lH6aim0ae3BiW+eV7T3pwrkUsP9ma+nQiqQL TEk5AegwHKFsrRdQFwXPD5LjFACgwmWms1ouoNSqhxWc4Wb5eJqYUOZ/oC/2Zrclacyg Xdiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iMOqmRNU; 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 k14-20020a170902ce0e00b00176c9015627si27461426plg.94.2022.10.22.00.55.57; Sat, 22 Oct 2022 00:56:09 -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=iMOqmRNU; 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 S232014AbiJVHzb (ORCPT + 99 others); Sat, 22 Oct 2022 03:55:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231774AbiJVHwG (ORCPT ); Sat, 22 Oct 2022 03:52:06 -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 4B8EC2C6EAA; Sat, 22 Oct 2022 00:46:49 -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 DC8EEB82E2C; Sat, 22 Oct 2022 07:45:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34F32C433D7; Sat, 22 Oct 2022 07:45:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424745; bh=ZHJKRnJNRELyEddaOAAZOUeQIBlE1rnuDZ7KrfCHud8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iMOqmRNU9+1cKweUgPDAcHuP7tW9qcvsnRn+eIMYU5fFtyqor2Q5hxJz6KFW/bI3O ix7PrUPou/E/lYH30rICMd5p2FJyv7bTM6t8jJImKU9f6hyTspmUsuMrX1lp9qh9B5 RVZJgfaZjh8aDZ4n68t48IBKEG49dCEG4p5LZU54= 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.19 231/717] spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime() Date: Sat, 22 Oct 2022 09:21:50 +0200 Message-Id: <20221022072455.967763261@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?1747373648581333437?= X-GMAIL-MSGID: =?utf-8?q?1747373648581333437?= 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 ae4e67f152ec..7d89510dc3f0 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -1198,8 +1198,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);