From patchwork Wed Oct 19 08:28:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4721 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp213941wrs; Wed, 19 Oct 2022 02:11:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5/v37y/Sa8K0Mxwf7toY5CMJ8gGF8JV7cPpNOXw7Jt6yYrpAZhh0vjccYHjlrqRfOr6DWh X-Received: by 2002:a17:907:3e1b:b0:78d:ccd0:c9f8 with SMTP id hp27-20020a1709073e1b00b0078dccd0c9f8mr5963311ejc.705.1666170689852; Wed, 19 Oct 2022 02:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170689; cv=none; d=google.com; s=arc-20160816; b=em259b9oxYBsDpiCssRC1QlCrUuJsa97SCwX8dFdU88+3v65YclmTswtoIDREfvvb+ /a2EKOwp9XRvYQEQTV8qcFShsWKwcmLEnyijYfB+UEOD9GEY8r8CNZFyQVrgjGIUxaKy 1ILLOwpLmr6Q2LvOixyMRDtLhq+3NlmykjgFBVZfC6Rhvg5a/+hesBkaU8FhFuZsy7bK jmE8wIyIN8SnLcF88NBP9VT5gR3teldhA0XEqHXHTy1yrO+QDcajoctVURca20Lz2B/C hSPVdXQRopJak4Rxi8yIc5K65TemZFDWO4KJaK559nl0u+Jv3OdbU4WrL1KBiCuzbxmX gYCQ== 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=Pqsi/oSEHdPrbSUguBdD5ZSFo4p/pDJIQ6PYEa+UnRI=; b=sWTsrGJjVThQq/Dv5hpLr/X10Z0KFMCQTPAZGVESO3yipcjpB2hYMJQnPpc3OdC1Y+ jqfNndHfhAdT8WGF0yZxDPccfKTa3DVchdbw/HvRyF55WUHTJNGsfNu6kmsz13ga1UVJ 28mqZ+9wl7Bze2kWc72Hzm14dil9mJ5f/My4sKkPngrI4TQ/xmi0D5e8MBJ8Kf9/JThC IhNq1oBn0pr4CYQ1WMLGgxm0kOlDMPKOSvxN0t5m2f221dmJxh2gkZVhDGbz553lPd8S QWsSf/bh4H8NUFFVqGECHurEnf8pBi+nLaN9thEEI7Z6YvdJuJWuaiMu5lHs23Uh0H8m gfyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dSmCtjGE; 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 y12-20020a056402270c00b0045d636ca148si10995551edd.575.2022.10.19.02.11.03; Wed, 19 Oct 2022 02:11:29 -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=dSmCtjGE; 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 S232488AbiJSJGh (ORCPT + 99 others); Wed, 19 Oct 2022 05:06:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232583AbiJSJEj (ORCPT ); Wed, 19 Oct 2022 05:04:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C308AE85E; Wed, 19 Oct 2022 01:58: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 812516185F; Wed, 19 Oct 2022 08:56:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DB34C433C1; Wed, 19 Oct 2022 08:56:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169810; bh=2WooE8D/cUxVBYIfx9GZFm20L3hz0GRqkr2akxT6PkE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dSmCtjGE4VOc53QQuDuwGZcD4W+dk5HnghslZoWu2ccz7zGu95u21xOEZOsDCqv6a K7UkOrwElV7smAlULo/fOE2G10cU7t1/paTYgJzc4prjT44HWNNij0RlNkrcU9n+jU 72WZ5/JLxcGX2sO6VyHJ608XH8FoTwO0QYedjV4Q= 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 6.0 410/862] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe Date: Wed, 19 Oct 2022 10:28:17 +0200 Message-Id: <20221019083308.076858442@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747106597007741846?= X-GMAIL-MSGID: =?utf-8?q?1747106597007741846?= 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 f3f4a10bf0f7..fc634c995834 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -2457,9 +2457,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); @@ -2492,6 +2489,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: