From patchwork Mon Oct 24 11:30:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10193 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp641803wru; Mon, 24 Oct 2022 13:36:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7UTRSYS4JWBcYgxf/dBpzyZs0XGq/HVlt2wI7rpI2te9PfraxVcfXZzQU702yVU7n7d+ew X-Received: by 2002:a17:907:7d90:b0:78d:bc5a:913c with SMTP id oz16-20020a1709077d9000b0078dbc5a913cmr28812295ejc.390.1666643795898; Mon, 24 Oct 2022 13:36:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666643795; cv=none; d=google.com; s=arc-20160816; b=ePCL9lLBQp7jC4XOJr59MNioILaRPx/MQO3PLbgPArJmGjux1GfneZWzEos6Age/fw GUnFF4efQusY8YYCkxG0mbPbV9VbahDoNTCUqEgQGG/AykPhU4B8xHbNWd6unxo0y2/q e8ouqF7jExmKPQy2SwElm4NE3aNHR6D0oZ5R2gcTYu0ceFp1W5nsMfV7K0eXe9EAkVGy eVvCIs0kFeLJMde7FXKFDnXG4lIGHSAvdmmyxcj79chZ9yMUH12gflGJvAXZ07GeXAgN TJdMFhY12UmA/7DE767yveWHz1m3xSenRxfdxbGlm+gPaeYAaz729UhLxdWIAkvSsA7Y Saaw== 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=YP7UZEqKr1ufPntwYO7ntcD3yugAAp6Px/OEPJEV88s=; b=MpST+BBpmC7oscgm4CCvlDwSJZryCftZgPfCtfww4h3Q2udVhwV6sPHNqUbT/qkkw5 h1Q8YLAdvNU0UB66vI3d5Ueq/ThwQdEqEy4FumYTSAr41hDQD1PWvcWHL8eJx52a9rTd mTDgE4s4f+ThdYLSlncmBWcoM+zOl1k4MLRSQL3FGtYm+loImJgrFktzMxbVcw41/2tb 038KPaKT4ZE9svda0awSvcYjo0d6+Nd7OTXY/Xydz1wbwny+3LU9FrQpFSZTEdv8I9FE QMv1ghF+sBK6Oj/RG1u9U9bJn7YNOYkS/Ujcmhu+WQQAW27X9XII/CLHbh9UoKa6lDyK 6aLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="CyD/vG/I"; 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 h5-20020aa7de05000000b00453b9f11b56si598987edv.261.2022.10.24.13.35.56; Mon, 24 Oct 2022 13:36:35 -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="CyD/vG/I"; 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 S234278AbiJXU0L (ORCPT + 99 others); Mon, 24 Oct 2022 16:26:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234444AbiJXUYk (ORCPT ); Mon, 24 Oct 2022 16:24:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55DCF25E9; Mon, 24 Oct 2022 11:39:24 -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 94B9CB812AC; Mon, 24 Oct 2022 12:09:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F271EC433D6; Mon, 24 Oct 2022 12:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613353; bh=zVw8f6eVRwzJ9ev+ioz6DzxGJvAN9wL6YL/KwtGDU+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CyD/vG/IntdEKMr1foHhAEOMl1q499e1HtPeoYBAfNONErXpwZhoVO9KQJHZoTNG1 WysHooo2BmJhV4jae3DgY+ouNCAkwN4pzTvbO7TmGHAsPJmKEXuLeaBQ8HfoohYLMv QC5KrMZwoAXAcHcrZYO9M5Z8fvICqS7QVenySmGA= 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.4 105/255] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe Date: Mon, 24 Oct 2022 13:30:15 +0200 Message-Id: <20221024113005.951281610@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113002.471093005@linuxfoundation.org> References: <20221024113002.471093005@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?1747602684472747887?= X-GMAIL-MSGID: =?utf-8?q?1747602684472747887?= From: Zhang Qilong [ Upstream commit 86b46bf1feb83898d89a2b4a8d08d21e9ea277a7 ] 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. We fix it by moving pm_runtime_enable to the endding of wm5110_probe. Fixes:5c6af635fd772 ("ASoC: wm5110: Add audio CODEC driver") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20220928160116.125020-3-zhangqilong3@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wm5110.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 06ec3f48c808..bbe9fdfb423c 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -2452,9 +2452,6 @@ static int wm5110_probe(struct platform_device *pdev) regmap_update_bits(arizona->regmap, wm5110_digital_vu[i], WM5110_DIG_VU, WM5110_DIG_VU); - pm_runtime_enable(&pdev->dev); - pm_runtime_idle(&pdev->dev); - ret = arizona_request_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, "ADSP2 Compressed IRQ", wm5110_adsp2_irq, wm5110); @@ -2487,6 +2484,9 @@ static int wm5110_probe(struct platform_device *pdev) goto err_spk_irqs; } + pm_runtime_enable(&pdev->dev); + pm_runtime_idle(&pdev->dev); + return ret; err_spk_irqs: