From patchwork Mon Oct 24 11:30:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8695 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp422612wru; Mon, 24 Oct 2022 05:23:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7W7GIoPhMPfxvP5tChgyTqDCpIg+BfdaC2QOBA7yHue9GysrvMy3+HndIWPUI/VzfwL2Gp X-Received: by 2002:a17:906:8a61:b0:78d:9d00:c906 with SMTP id hy1-20020a1709068a6100b0078d9d00c906mr27379437ejc.321.1666614184659; Mon, 24 Oct 2022 05:23:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666614184; cv=none; d=google.com; s=arc-20160816; b=RB6ZePGlH48ZYyYRJRQd6nUvBaTKmkRt1hCgPGd5xgfCOizubAZmObfT4CWGCMAE8n /UpFK701ohYKWyTkACVU3SqUoldOo+5+EO0S7PB2UlVOqwS18vQA4M0LoafMtYo8IO8R UAVZ8CGraxcMay+8efFYgUzPKJ+fCBwsbFk52ISN50LZgx7iUUAjgUa/oNTaSeg8BQsy rImGGgd7te0bEtPRkQzb2o9mdkzHFqCTS+PDB4cQ+IA2PUxFBnZT6nUIETgUS3cuI9bM eHql41JsyiMaAvqZD+u+przw4rgQzUAi+JD1H2lNRlcFxPv8wDa9lEsN4x0HhpX+fGqk vIdA== 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=5k5F37oYNEmCHEgQoezfMItExK0RqaWxSVY7Rl77OuQ=; b=a//YplF0HYB3fJ1npVAPhK83skUoHuBW0iDu6R6idN0eioawfuv7IZh/1w82OFu+Ln tESVdLmolf7gr3W3ycR92n7SXm4UhUCRrsFTZ8JoiXqqKNjEXNBxtCIhW7T+Xy7czGZZ dm27i7yHno2Gl9ypJqOu7wHo49ACJf3+Ws5wOXpwEUwQ6EO22HH+tnJlwmcpMmicF3W2 b9BdApV2CAFqdllW4Bi3S4iKVsNCTXWySYjTfQOXeor69LEZLtObyagfN3JIjlqrPDq1 v3sUUBLBihpf1uORKcpKVTKA9TZ/20ixYr0CybRay1NgybPSiNIcSanEY5kku8Jl384q 0pMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LNVavv5W; 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 p11-20020a056402500b00b0045d212cc170si26235262eda.363.2022.10.24.05.22.39; Mon, 24 Oct 2022 05:23:04 -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=LNVavv5W; 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 S233426AbiJXMVr (ORCPT + 99 others); Mon, 24 Oct 2022 08:21:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233512AbiJXMTn (ORCPT ); Mon, 24 Oct 2022 08:19:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B058982D02; Mon, 24 Oct 2022 04:58:23 -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 E58E661280; Mon, 24 Oct 2022 11:49:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01680C433D6; Mon, 24 Oct 2022 11:49:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612144; bh=1dNVR3X2IySjniVZceBtGxiJ2W3mMOjlJ9Z7yNLlviY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LNVavv5WrR7OeYuLXPbo6uypjWfDIxZvKbTBq/6ik0/cX6Ex2Vx8ukiaaYECcKKUV ZUBfLTCOnd/mkirCHLEHZ+9h5ypg7hZAKb6mGIRfNaON6oE4GQ/IPtR/wTzkLUF/5w Hfy2PlbweD/FyzDzlrHoTyuWTit0Q1JoZhWYKFjA= 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.14 086/210] spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime() Date: Mon, 24 Oct 2022 13:30:03 +0200 Message-Id: <20221024112959.840946811@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@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?1747571635136974958?= X-GMAIL-MSGID: =?utf-8?q?1747571635136974958?= 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 c5c727274814..1ca678bcb527 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -1172,8 +1172,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);