From patchwork Mon Oct 24 11:29:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9097 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp453704wru; Mon, 24 Oct 2022 06:28:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM75LznJP6+8dafyxoN8/3zIUchMyRDBLGILupDGzPAZqiJX5O2qxil+yI07y13mUujDCq+9 X-Received: by 2002:aa7:c956:0:b0:43b:206d:c283 with SMTP id h22-20020aa7c956000000b0043b206dc283mr30961573edt.381.1666618112626; Mon, 24 Oct 2022 06:28:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666618112; cv=none; d=google.com; s=arc-20160816; b=ExRnTlNUZhMSAdWeynq1BCZzjBw4woDKBXG8P1wA+nc5BknGF8hj12zxtrcboNJ2hq Lo4Zo5Ouu+Mnow4CyoePJdtQKKV5kh7oR3lZ+IPT8AEfUxgDjChK66S0spu9ZFiTDZaP ZnRoVjprhlZOUXX1z2rN+gwEZDrBzmPzOzsUDCX1SDlH8AMvNGF99gqHnevEyi9ZRCOk Jg0ELPYSbWYPcCmepPBZhJ+4c2UY4gXnvXT6EItez2IGtRHW7dHke6JGRw24NB018wbu iB8vYIW69xMgSLGdjecxV1uUVWWvFD0yJRMbhGBjDXB3iAtuWM/aoqVq/FGTcdFOls28 SYCg== 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=XJmxgd99L0IPVqEh4i4NM+KZSwQtVCeB1194mju9aRc=; b=VALsoADE1upbOGsaWVOA6eYbeFFxuW6hAecan+GVlCli2Vhab1DXIGg0NCVw32aui4 BGYpFbVFRgf55lPSjKQ7PADYLQ1oiPW3YrJIJxY7IpacNUPk1TpseD/hGZapYQV+Dl8w ak0b1DljVQUlmEavcG8xZbU8u0IKPjNSWDThLzKyIZqh3FShH7YR2LpGT2y66TC3Wygx 3wWjyWCVYuR7w4eVnThdQVRdxFcbPKQ42SqjHt57qZ8Hdv+gg8yN74Qxr0tgA9fQxAy7 H/Dnt96t6cNezFZ6yMiYIOxd2GYT/U/4R8RBYM5srCiNRuhkKjv6e+8koPRf+H07TU+i Hr+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zvpuxbPl; 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 hs29-20020a1709073e9d00b0078262e3839esi22182566ejc.27.2022.10.24.06.28.06; Mon, 24 Oct 2022 06:28:32 -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=zvpuxbPl; 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 S235818AbiJXNN2 (ORCPT + 99 others); Mon, 24 Oct 2022 09:13:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235448AbiJXNKl (ORCPT ); Mon, 24 Oct 2022 09:10:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7F8B2528F; Mon, 24 Oct 2022 05:24:15 -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 2F00B612CF; Mon, 24 Oct 2022 12:23:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AB7BC433D6; Mon, 24 Oct 2022 12:23:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614192; bh=U0blMcKFnjiZUPbpOFKpialXxKENKP4nNGEyBSB7tUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zvpuxbPlWnajIMrQrpVUHtSqhV+RM6S+Asy0nyjj9YqpzKxzCQJJLSyZ2Hvu72rP+ OeAKCAwQ/9sKKuhKZIhKCNGKuqg+3sv+tkLE/rtD+YiB/bBu/IWC680ACdY+gCtWV0 6s8VFlB3zG+3akfH+Q+TkDsfS25mGUHTLmhtp/Ok= 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.10 167/390] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe Date: Mon, 24 Oct 2022 13:29:24 +0200 Message-Id: <20221024113029.822627514@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@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?1747575753961451835?= X-GMAIL-MSGID: =?utf-8?q?1747575753961451835?= 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 d0cef982215d..c158f8b1e8e4 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: