Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp816508rwi; Wed, 19 Oct 2022 03:24:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5N3k/8VVouFHrHVKjrZXkJd6kuklohqfsp2n/YnQOSH9ovxPGzqXr+8guuA8cxcixOOmid X-Received: by 2002:a05:6402:448c:b0:457:52eb:b57e with SMTP id er12-20020a056402448c00b0045752ebb57emr6859366edb.178.1666175059745; Wed, 19 Oct 2022 03:24:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175059; cv=none; d=google.com; s=arc-20160816; b=DFMmtso7lpygjcTKAVjUi8leg52aEVUvAaSmZEK8lnZO/MtrURbitgX0pMTr+9EhJK PEX4jZmbc2kIP6rTDgPcMjvpSsayMA4w92qpKjkKEZErdLXn2rTmbJ3Sf88c3PlLQmFE 6D3YWNqlxyGnQjIlg2qEJHhCqUa1smLsjyc3Q53Yu2kvYGvvP8osyBY6S2o54ajm9gqe 1c0Hb5KFiapASW2bW50e4ohWAMYdSDffueR3TLXplNthpDUTVe9klEPZoWJ6wtDD2jSf T8mBRzNUOuwde4pqzDsDpxCZTPl/E8Q5DlSM6h+6ToLvrZmlFtG9QameolHXhFGKhc0Z Am+g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a056402510e00b0045dc25bb7easi5758216edd.555.2022.10.19.03.23.53; Wed, 19 Oct 2022 03:24:19 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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); -- 2.35.1