From patchwork Mon Oct 24 11:28:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9195 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp458902wru; Mon, 24 Oct 2022 06:38:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4fczfrn7BytQND+dRe5EdZPMFGTPRQmAXFLTgfY3jAj+bxZ8FNM7kSY6fOpqEXq3m1iudT X-Received: by 2002:a17:907:2da6:b0:78d:3cf1:9132 with SMTP id gt38-20020a1709072da600b0078d3cf19132mr27684803ejc.299.1666618709826; Mon, 24 Oct 2022 06:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666618709; cv=none; d=google.com; s=arc-20160816; b=DEvxsJKU3x8NX90jQZv/2zm3YAVsCApBs7swFKgKuzrwtl22Ma232MH8b1J0X/7QHD r1ASR2PzJInIay8f5M5ZLZ1TQxfu6pRN2Gg6/SRqE0yiFPXNRZETFpyHfQkOqCt/B3Fl /DLvnGAdWJ2Mw+qHV9iUQz364K20F6M8/jB5bznPuI6moFUd4y9c7KZ3gYv/0tp2Ms3n UXlpgH43nLUSmdM6dUOg0ONBDGXHTTHot16NlhXB62tl48cAgUgGna351ksS1kQK4MM4 E0mqtAfbTGVxIyG3LqYfVUkRCgml5/GHBqkyYNiUbxT4dOc+mqQ7SrD8rnXjn2V1M64m +aaA== 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=OR4x1iBJUv8mZQbl6ozuz6UiQFoFpJM2NQKfI6Ax1PQ=; b=WKixoT+HoH2qffVdYQR0swNVouFFZWDSVH2xhQpK3jPIToAY4sdpPsKH/iVKjtGKHi QbokeQdmxqn/OhFPU+VgUp1f0uRiq6mxST0Omw0eMN+J5q27qpW4LWrdxTMxuVXAWll7 JvZowWIvWPgFetlsTjXfMqRqhEZzhTdRKUnfNvOjySGymeSqSwEP4PjH5Ly/Z7fmxIGH 6CT1KnNAIOuvgZlhfwYRkLRdiS2gDgtXyknrVY5tEq7QqRVf3DTKzx1x3ZF/sHV65WWT 5ZlwpjVFc/H7a0UmwjiAk5XuATH8zlH+j7QTXqBwLMy9gHmGKiUTq0UBSkhbnCrvPx7I Evsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=glmoucV+; 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 o10-20020a170906974a00b0078dcdb1c9dfsi30515159ejy.553.2022.10.24.06.37.45; Mon, 24 Oct 2022 06:38:29 -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=glmoucV+; 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 S233313AbiJXNXV (ORCPT + 99 others); Mon, 24 Oct 2022 09:23:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232290AbiJXNW3 (ORCPT ); Mon, 24 Oct 2022 09:22:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1328A27B20; Mon, 24 Oct 2022 05:29:34 -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 1DE086121A; Mon, 24 Oct 2022 12:20:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 348B5C433C1; Mon, 24 Oct 2022 12:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614050; bh=gbWOcWJVIeCSTWsZe9h9k7u01aFXM886CSuh3qHNISM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=glmoucV+4/XZq3d1LfhwLRzpbWjgUN0drDcXO2Q/BDg3Y7ZUI7YFh+c5Oy7qFFpC8 u23qHwZclpj++pW2CW9lVa3xwtpPEfEjncQWqVgFaplJXsJuDKO7V/iGwqWWTGfhN0 Nfd+k/7XWZ67j9m5wLrafiStTSy73cH5YgiqZN2Q= 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.10 112/390] spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime() Date: Mon, 24 Oct 2022 13:28:29 +0200 Message-Id: <20221024113027.475723989@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@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?1747576380121756874?= X-GMAIL-MSGID: =?utf-8?q?1747576380121756874?= 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 668d79922fac..f3877eeb3da6 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);