From patchwork Mon Oct 24 11:30:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8708 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp423003wru; Mon, 24 Oct 2022 05:23:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Sc+Gfo3mrNEwT7HAoDdyMR/tqZMbmu9S7xMHOLTCYGMl572QUtd53IQpqjNLCrJLXTL3Q X-Received: by 2002:a05:6402:34ce:b0:45d:14c9:c522 with SMTP id w14-20020a05640234ce00b0045d14c9c522mr30248950edc.160.1666614231172; Mon, 24 Oct 2022 05:23:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666614231; cv=none; d=google.com; s=arc-20160816; b=yYHzXeHPWP4Zv2j6qijaN1umdbmLw5bhxfPN7RGtoRYssXDAl/gA+fqMUXl2ECBS1+ GlmB60TnQi8CV3c78a7KVPoNEIwJkXDJDpSvaTwovgrJTO11FnFO93QXgbVKnye2K0dj c7POoCf5lsmheNMs5wFrkQwWsSX6QCo3mYThrX8W78kH8bOhLXzHm5BgjFFAgM4akFrh F3wqtq64W4LGWgE1WuXc1UkuPVvuwpNVmYJAXRmyE/YqQVmkrHUGSmBt5p2oIecAJRvv 7GcgbRScDbFy9EkFTtqfaHAB81r2dEdv6K+VfInrrtW64SGgVoc/A0LjovTzMcZHFrZm fHeg== 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=l4VMmjmMqjdYgy6yIB8Wy8uM7sYFPme4mBMOOrkOfno=; b=a6KmKR6bR6FOtEK/bfBg8rC1qNiuBjWsBylfh9ZR2zxCTOJ7qQuVJPHG7i0oHRQT6P C4UvvJ6c2yO+QRfIEN4yjer6Yy99zL2fWEyeJUYJoMRU3N1DYP/OxwvR6SMZaJjyqCFq 1SZmYkECLumkPZWbJqPu5DUeRKFNKR/2n+7HDRYq5Kqrt6UMPJmRbcCY4Z2UQIDOH7L4 GIY+5pPTutcebV399bwZYFICGmSNfSfh91J4EPTLSavcwRPDVPVgFW7hrm2OMZu+p4bI ph8NXYwCLACb0PxG+xKwm9mWGOTeeZV+j1NiNA9toatJ5PhLCwjXEGjfIODJu1FVgqQg 28Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=StokCbB0; 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 sb36-20020a1709076da400b0078dd22dd569si29424463ejc.121.2022.10.24.05.23.27; Mon, 24 Oct 2022 05:23:51 -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=StokCbB0; 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 S233476AbiJXMWL (ORCPT + 99 others); Mon, 24 Oct 2022 08:22:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233572AbiJXMTv (ORCPT ); Mon, 24 Oct 2022 08:19:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC7A67990A; Mon, 24 Oct 2022 04:58:42 -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 78DE2612BC; Mon, 24 Oct 2022 11:41:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AAB1C433D7; Mon, 24 Oct 2022 11:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611678; bh=TU4uPUlz2aBAo5ptSH8Omzj8EzskygPLm/0gr2snHyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=StokCbB0kb8SQUL4H2sLUB2B8dU0ZaFi2N4+kMh7tYaih3xESn2Mme6QDnFS2pi6p 8MsaTTstD2mSZ8ehleHUSEhLbxRBjLgs2l9ids7BUFS87bpVfLfaEHK3hL4xi/+p84 k7vNDuDYbWEHO9mj4od6YDOITPR0tYOy9Q51Nzms= 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 4.9 069/159] spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime() Date: Mon, 24 Oct 2022 13:30:23 +0200 Message-Id: <20221024112951.985158304@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112949.358278806@linuxfoundation.org> References: <20221024112949.358278806@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?1747571684368826173?= X-GMAIL-MSGID: =?utf-8?q?1747571684368826173?= 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 431cb184595f..bfca5f38d7b7 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -956,8 +956,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);