Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp798536rwi; Wed, 19 Oct 2022 03:09:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6qhkGS/As4FR+eluI7Ds+Yk4hmRNsPRmF+quFLuXblDAEWDJpKz5blfsnmRR42BTj5/AxT X-Received: by 2002:a17:90b:4f4a:b0:20c:64e2:2bf1 with SMTP id pj10-20020a17090b4f4a00b0020c64e22bf1mr9255064pjb.30.1666174154138; Wed, 19 Oct 2022 03:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666174154; cv=none; d=google.com; s=arc-20160816; b=Jbb0aEBwQlw31Ze/rf+YuwuqfeUI/BQYnQVGsfq/4wa1fYH4Kp8zSaOhLx65HXh0ir AE1phW0NuaEGUKnyFo6eYjnGUR0u4W1XFAQIhwKqlqUlh/LMXD3ZD5z56ByfpjZk73Pl QC8rIDilvLMlGb2HlZJnQZWyNyapB44XnFxhcAU3kChtXIHmZ9kMZ29rlwumABt9iBTL wUhZtITl6j/6efNW8BeVfDp4TNhq3SqNgqU2Pj9qaKcrUX2sylq5rRKMa9szTZ5bFAvy Ri216Cnwu95ubjmtdkt7FBNbBEtt/Qh76lexqF7hWhBdg7s7osW8dD/DsWiMdbLEszh8 KPKw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp8-20020a17090b190800b002057a08d66asi15618811pjb.23.2022.10.19.03.09.02; Wed, 19 Oct 2022 03:09:14 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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: -- 2.35.1