Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6737527rwi; Mon, 24 Oct 2022 05:36:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM59Gx5vXzDVg1f3TN8bizKgZq3xUHCqSTXnhuJIEZuTGLiuXhgJi5npGZ4czD0q8x6i8SC4 X-Received: by 2002:a65:6d8a:0:b0:43c:9fcc:cb24 with SMTP id bc10-20020a656d8a000000b0043c9fcccb24mr28332842pgb.477.1666614997282; Mon, 24 Oct 2022 05:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666614997; cv=none; d=google.com; s=arc-20160816; b=lFoupyYdct2p/h/4iRz7vH30J/O8Udm2RdZh9FgUdu/ay5X66L4mSHCWZgBYLh19At 0RiVYcECEaEZxrUajYSv0okjfOZKq+Kpg6XWHs6eWMqL4isabPnxVDDXLYG87Ch8I8AC RrNHF7G53pt78ud4wFwsCzQmfUQuN7dMr1aVK4N2yVWqIkwjtkhNTb+5NV3b8fTcWj95 igVkrZX3JZxLSA3PqKg4jROWBgHB33u4w0vloTcVltWuSC+AjPtajc4l2HX89zXh9Tgm HS3NTynwOhbxCNvG1G/VVTmyDcdR0x4fTtDjc6aA/9eJNtODXPCUP4cKS1VH2EXUxmEA jiHA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 25-20020a631459000000b0045a8ae629d3si35251523pgu.199.2022.10.24.05.36.24; Mon, 24 Oct 2022 05:36:37 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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); -- 2.35.1