From patchwork Sat Oct 22 07:23:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7418 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1097599wrr; Sat, 22 Oct 2022 01:08:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6setanKqMS0mF5lUR5KosvQ+SWmpXA3neDI63OPYUg25XgdrPXaieDiDgVUXlZlckHdp7p X-Received: by 2002:a17:903:1251:b0:17f:7f78:e71c with SMTP id u17-20020a170903125100b0017f7f78e71cmr23489952plh.147.1666426093161; Sat, 22 Oct 2022 01:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666426093; cv=none; d=google.com; s=arc-20160816; b=QjwU4EMXrpUfXEjVJDZIJYsXYvzeYr6P+RerZLzDZU/3l75X3DAYJTl6tIWTTIQoj4 HVNOqtnWbF/O28uZaP1yZqcqV0pREaIQg8thvDdNQ1tz1I3N/AFB5MMnvoFXlWL+rc0S rlJJX6f+vUuOk7KO37FShCEnew8fYLtetawesYJB89nzR9FXwflgwQtODfEqc63y+mBg ahKE3HWZMxlsBpOYV7C+WUNgnekvblqf1lJLKCR0cU9DOsKttASvKqtjAdAxrkJTn3q3 GRjPBYOFtcV/wYlSJwHsJ0uZUzPZBCyLMuGx7HVHp0oNJsbMumzFyvx9sHOSrH4slsE/ PfIA== 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=jPKV0BnWv4tLymD7ks4G6BxLvMaO8VvRhEUt9Dzoehc=; b=iRdyvVIyQsZgO9gnLBwQxujByB0UcL37lwSqiKBQPLX3kE72wr0U4kJUonX50C6Eau yKqhO0fsJHcE3tW8+rNLOJ58MQ/oJKgekk4jMnXm5Q8FebHaQwEwcEnIMkENwNbG9b2f eclxEuA3AHvqUlVRlNgEw+AJl6ZWE1sae977zjeEcBCb2+8PZTZ4tJ8Jl3iDPtdVm1LZ Vtm8ysFxU7pbtoTOVJ4Slws5IkNca06EUnjY8W/lATCbqs4DCS/Yi5c0EBI3CSBFoY0K 8weIaz/uQ9hWZVkwUCFRdQL+bV27ovRT9/LUx0ttKaI8yHqHC+DV63NSunxgvTv6bqZd r8zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=C4TYIsGo; 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 q34-20020a635c22000000b0043c9db24662si28159610pgb.269.2022.10.22.01.07.59; Sat, 22 Oct 2022 01:08:13 -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=C4TYIsGo; 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 S232774AbiJVIHq (ORCPT + 99 others); Sat, 22 Oct 2022 04:07:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232717AbiJVIED (ORCPT ); Sat, 22 Oct 2022 04:04:03 -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 D01892A4E35; Sat, 22 Oct 2022 00:51:21 -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 53214B82DF1; Sat, 22 Oct 2022 07:49:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9622C433C1; Sat, 22 Oct 2022 07:49:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424972; bh=RKozKmBB0JBkOoa/PJoj7yI411/Su3O6UrAsmEnlFdM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C4TYIsGoAdmaj4LMKiJB+iP0PNqRCYCdufenGnQdf572JKq03rT/kb8aPsvnbxG1c MiVSh9FSu5sjIGOB0iLESQX7Mp+ionxYO+WBQgwIupeB0s0Qax6M2d8LRxaeyKq2Yb o3aC2DzO5PnHPQQPnEANEUAAPSAG6152Ha08ylCQ= 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.19 344/717] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe Date: Sat, 22 Oct 2022 09:23:43 +0200 Message-Id: <20221022072510.810189432@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747374407084781690?= X-GMAIL-MSGID: =?utf-8?q?1747374407084781690?= 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 4ab7a672f8de..1b0da02b5c79 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -2458,9 +2458,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); @@ -2493,6 +2490,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: