From patchwork Wed Oct 19 08:25:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4729 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp214110wrs; Wed, 19 Oct 2022 02:11:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6X8aDoOCimbRe6N56sFZ8a/0ftokbpbVc9+y1HbRex5txaSDN12sf0Gw0JY+VYfvIx3xAF X-Received: by 2002:a17:906:fe44:b0:77c:e313:a8e8 with SMTP id wz4-20020a170906fe4400b0077ce313a8e8mr5982196ejb.700.1666170715144; Wed, 19 Oct 2022 02:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170715; cv=none; d=google.com; s=arc-20160816; b=VLF6gJZeRaFUrCxVu7py5833bWJ68lj5ctYIYup3bYRgmJttn93ZN40maA8W1tQmBV D0vkaCQvtqbPO7Jfbmca6L44oThhuY7X+mwuMrFygz0+I7HSU3PWlrYw8lkijNPNHKri 4A29NmFiLd4UyAc6KOQfD1glE/KTgef1ksj/sF+6oCDy9N/O2i3ZpakzueeZTelT/bmT L1p9awTvLV8K/actXFIO++wV4KE3fiI2sXbfbEC3EfaWq26V3NYvix4Vnm61R+z4ULGD XJ5sWN5oj/McES7aR4zM1TsD7Zzz/kZS3EY8h94DHTqAg6YnwKNTikX965c+h0fIr92i fV+A== 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=Ix5ZWt9AgKiv189y4ujm/FW1835cGvMhPgtLHzLHkW1PXVuMfyZP9rtWyB1GkxFO8O 4zBbWJLzPALbHUQd4RzcDmkQF+mU6XunZ2BeFP0/dW4mR+5UvP9Q+y2+zDTJ/5T8l7Bj kvqM8OqKs9WtlLbDSf4FDqDd83QxAfohTopE31dezo/DXiTa69QWqdT8v4/27NDP9Nj0 mP38SFCAulQtbQhSVsvp3YFHT2FOeStOzNVfQMrBDom5DGzkcGXXkTHQSWeakmjEkUf6 vdlnJ6JVVg2dDXQ1k96jcP2fS+w+fqmQkU7zCQ8ui5C9J0bU79boMLl9qES6KavGhcrl DYQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QROmJsKD; 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 v10-20020a056402348a00b0045901aa2468si16281066edc.333.2022.10.19.02.11.30; Wed, 19 Oct 2022 02:11:55 -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=QROmJsKD; 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 S232593AbiJSJHj (ORCPT + 99 others); Wed, 19 Oct 2022 05:07:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232103AbiJSJFK (ORCPT ); Wed, 19 Oct 2022 05:05:10 -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 ABC49B40F9; Wed, 19 Oct 2022 01:59:16 -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 2476161847; Wed, 19 Oct 2022 08:51:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37651C433D7; Wed, 19 Oct 2022 08:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169461; bh=ZHJKRnJNRELyEddaOAAZOUeQIBlE1rnuDZ7KrfCHud8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QROmJsKDfMQ8XatKK386Y/912ak9EOae2FjBBX3P6ltWY21QTnljSW1H7v/unaD1Z AGJdbSoBFRBXVG9Ycqsfqk0pOQTe7E6iNzSmux8mu8yHCSpCulDxsev5xSI/yXMy3p tNMBpkmMsylweDreJ4FMVA6tQTqWhZRg7aVVPKIw= 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 6.0 268/862] spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime() Date: Wed, 19 Oct 2022 10:25:55 +0200 Message-Id: <20221019083301.861564168@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747106624307119860?= X-GMAIL-MSGID: =?utf-8?q?1747106624307119860?= 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);