From patchwork Mon Oct 24 11:29:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8704 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp422918wru; Mon, 24 Oct 2022 05:23:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6fGzTH/1HbNt5MVh+DJ+RfGRt71u/W8Qf2DwEtfuZ27NApjEJiz0Y1ofBH+/UY3OUEXNJ1 X-Received: by 2002:a17:907:3da2:b0:78d:45df:b4f with SMTP id he34-20020a1709073da200b0078d45df0b4fmr26700979ejc.651.1666614218527; Mon, 24 Oct 2022 05:23:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666614218; cv=none; d=google.com; s=arc-20160816; b=elMeGkM8IRrXkTAc1Zwc3h4mRuR5me1+Gkp9vZMAOSg69PyfQL0cn7Y84qJm7z2h67 3KY9bkXBzgRI5zLd2VystNubAoB2zU1ubYt+25MLgRj4ODBACbglkM1yMX5B+bpUaJT9 IEIqFbEsvAtAr3h9IEEZCJFKtOEMX+3edxMfPAvhJVne7vilJwreEtPvN2OS+oxoFyEX 2z3SMtwqf4c5nIEhUmWhS1QTChaqOWgzSBJrOXIo5A/1D1Jjt+cBfJ0vr7X+jFejo1va F3liLLYPvKRBneybzXQ699Sk32MfrumYFie3MEFMTpIDEL1r/4+oo3kzOyO1XemgAzLK UpgQ== 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=h3dTzTtRT8SobKRVCoZOGPq5i58YDcZNMA47aT3jPor4/liosJNUJCpWqk0pF9rtL+ MRIx3nE8jZFV0+ix2Rr/edajVuioqM5efcy3n0Mlw42Duuoo7eR4SBpbMO/eEZW4Imb7 YDAd04ChV2w88RAGrRjlNIUsNojaywZ29JLwIRqaecFjzzybzK9Hfeajm8yNymt3lV6/ EuaYIuf+Aci5cvpmIOD5iYdCRZB6CTMVUufNL+GAY9YGqITCe9iNA9gvjeONwhLKPFZS oCkMcWATkQ0KQVerb9SBopgB14pqlgpqYzLZe21itaP7Lf4PPfeaaiX4cUa9HB+uuClk WibQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bJ3yL4Rz; 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 oz12-20020a1709077d8c00b00781e17d3699si10658976ejc.203.2022.10.24.05.23.13; Mon, 24 Oct 2022 05:23:38 -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=bJ3yL4Rz; 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 S231392AbiJXMWX (ORCPT + 99 others); Mon, 24 Oct 2022 08:22:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233598AbiJXMTz (ORCPT ); Mon, 24 Oct 2022 08:19:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 567FA836C1; Mon, 24 Oct 2022 04:59:00 -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 C714B612D2; Mon, 24 Oct 2022 11:57:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCB30C433C1; Mon, 24 Oct 2022 11:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612677; bh=1dNVR3X2IySjniVZceBtGxiJ2W3mMOjlJ9Z7yNLlviY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bJ3yL4Rz36fXRYrfEoC7gdEP6IMpuBqiF65LBoeui5XSgLsvaNXdl2Rbd8W2LGJWS P9dITkQrO1JwtOmLUkgGFX+3MrNrJtZGj8uKoKI+8V4EhoepNOhJeIdF670eQs9ZHl SFxvRybudfY1fWS1fHWYpBO+802c/1Ob0moqZbhw= 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.19 077/229] spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime() Date: Mon, 24 Oct 2022 13:29:56 +0200 Message-Id: <20221024113001.561231833@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@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?1747571670869139009?= X-GMAIL-MSGID: =?utf-8?q?1747571670869139009?= 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);