From patchwork Mon Oct 24 11:28:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9798 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp554637wru; Mon, 24 Oct 2022 09:57:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5DKiyfMxM27DttEgXm9RVNdCduq/J8L+r8hg3byE3MRQs+1QVrFpiJsAUXr66lnpUL7tBc X-Received: by 2002:a17:90a:ee44:b0:213:604:53ad with SMTP id bu4-20020a17090aee4400b00213060453admr8493547pjb.155.1666630662864; Mon, 24 Oct 2022 09:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666630662; cv=none; d=google.com; s=arc-20160816; b=Tr2ptTqASpJnWiLyD5NBoolJONADMFuTTMzWoKRcBtx6b4sTVIcZecUamhDUoK9yk8 FZLbwjNTvILQUhWAwg9aZOQLoAoTfy0kkZFhkDsV+2gyw+7Uf8++78yKBirKT3iBBV6z cM0qUMWn+lByBxLsjmfsm9h7VvNZFIVRYiWHtztGgfCDl0QJtyepjidHTWvqyOeKM3Wz MIGoSHHQUOzbjbBXS0XKwYhsr/bqY+3aS8PNZ0522CYDDnOYQ+r4NLJM2b6ldihrLXR5 vCvHZToW+L3S05Uqd7c7PwG06QYDXJfDDR8DIQO7bHr+PrZtCTRq5calnm7PabRXgoBT mA/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=AvkYwu7Y3jkvZ6alWLtfagXvYipmN3O5BMvV5lnyp0g=; b=fLHRwxyL3rpzgfzrlOF8J+YJQv2CCGkgRnEKNJDq0NEdxtsNGVVdsmxTMVLIsrxfsg NR6ftKXK0OxYYJcwycsH4vneZJdn6y1Knd74YtHrkG0kRYBuqNTyawoSR2Nk4OZShn83 cuoTtIfxhyAbrlQx71YGV00GunAzNd1aU5wu53goLLPnDq0CYEYmbIXYgnVBncNjcVJr lsaXvRR+QaEiQi8ZU0DFNi8ZejoCzzpIfeLx5n6FJqu0QmxH4qYo8FIo0RTcPhChbSMc 1RbX046l+OCt94KGEtv2fkyJPfaBseyIP/ESpWBBGpWvw1bKZiGa/LM0nLTJ9WmMEVO+ Z/KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="f/IwYPVI"; 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 x17-20020a634851000000b0045f74df51dfsi17225084pgk.536.2022.10.24.09.57.23; Mon, 24 Oct 2022 09:57:42 -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="f/IwYPVI"; 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 S234813AbiJXQrM (ORCPT + 99 others); Mon, 24 Oct 2022 12:47:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234942AbiJXQpj (ORCPT ); Mon, 24 Oct 2022 12:45:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9266380BEC; Mon, 24 Oct 2022 08:31:14 -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 ams.source.kernel.org (Postfix) with ESMTPS id 3E9D5B8197B; Mon, 24 Oct 2022 12:41:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94AD9C433C1; Mon, 24 Oct 2022 12:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666615271; bh=qfRkPOfBXEFDRbBTB/Q/Jpv5q9piXIqG1CnSctn/W4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f/IwYPVIQJfcw1mBd6r7wA+Us9pT3d06Ah2GIBH8IufqIZWx1TWGzqqKHNsa8ZC8U OPimbSPTx4iY51pSt/DjPMK4BJAIC3cA49Jgsf1Makc7F3OabzUUeXVC7EJTa4/Xnk zGls5LKx0wM7vk6vzggOJgYy9uabgL97VeIeD+Nk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhang Qilong , Mark Brown , Sasha Levin Subject: [PATCH 5.15 187/530] spi/omap100k:Fix PM disable depth imbalance in omap1_spi100k_probe Date: Mon, 24 Oct 2022 13:28:51 +0200 Message-Id: <20221024113053.503111192@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@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?1747588914261286976?= X-GMAIL-MSGID: =?utf-8?q?1747588914261286976?= From: Zhang Qilong [ Upstream commit 29f65f2171c85a9633daa380df14009a365f42f2 ] The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. Fixes:db91841b58f9a ("spi/omap100k: Convert to runtime PM") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20220924121310.78331-4-zhangqilong3@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-omap-100k.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c index 20b047172965..061f7394e5b9 100644 --- a/drivers/spi/spi-omap-100k.c +++ b/drivers/spi/spi-omap-100k.c @@ -412,6 +412,7 @@ static int omap1_spi100k_probe(struct platform_device *pdev) return status; err_fck: + pm_runtime_disable(&pdev->dev); clk_disable_unprepare(spi100k->fck); err_ick: clk_disable_unprepare(spi100k->ick);