All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Qilong <zhangqilong3@huawei.com>
To: <lgirdwood@gmail.com>, <broonie@kernel.org>, <perex@perex.cz>,
	<tiwai@suse.com>, <matthias.bgg@gmail.com>,
	<ckeepax@opensource.wolfsonmicro.com>, <jeff_chang@richtek.com>
Cc: <alsa-devel@alsa-project.org>,
	<linux-mediatek@lists.infradead.org>,
	<patches@opensource.cirrus.com>
Subject: [PATCH v2 -next 1/4] ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
Date: Thu, 29 Sep 2022 23:06:50 +0800	[thread overview]
Message-ID: <20220929150653.63845-2-zhangqilong3@huawei.com> (raw)
In-Reply-To: <20220929150653.63845-1-zhangqilong3@huawei.com>

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 calling
pm_runtime_disable when error returns.

Fixes:40843aea5a9bd ("ASoC: wm8997: Initial CODEC driver")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
v2:
- call pm_runtime_disable when error returns
---
 sound/soc/codecs/wm8997.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c
index 210ad662fc26..c0207e9a7d53 100644
--- a/sound/soc/codecs/wm8997.c
+++ b/sound/soc/codecs/wm8997.c
@@ -1187,6 +1187,7 @@ static int wm8997_probe(struct platform_device *pdev)
 err_spk_irqs:
 	arizona_free_spk_irqs(arizona);
 err_jack_codec_dev:
+	pm_runtime_disable(&pdev->dev);
 	arizona_jack_codec_dev_remove(&wm8997->core);
 
 	return ret;
-- 
2.25.1



WARNING: multiple messages have this Message-ID (diff)
From: Zhang Qilong <zhangqilong3@huawei.com>
To: <lgirdwood@gmail.com>, <broonie@kernel.org>, <perex@perex.cz>,
	<tiwai@suse.com>, <matthias.bgg@gmail.com>,
	<ckeepax@opensource.wolfsonmicro.com>, <jeff_chang@richtek.com>
Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org,
	linux-mediatek@lists.infradead.org
Subject: [PATCH v2 -next 1/4] ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
Date: Thu, 29 Sep 2022 23:06:50 +0800	[thread overview]
Message-ID: <20220929150653.63845-2-zhangqilong3@huawei.com> (raw)
In-Reply-To: <20220929150653.63845-1-zhangqilong3@huawei.com>

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 calling
pm_runtime_disable when error returns.

Fixes:40843aea5a9bd ("ASoC: wm8997: Initial CODEC driver")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
v2:
- call pm_runtime_disable when error returns
---
 sound/soc/codecs/wm8997.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c
index 210ad662fc26..c0207e9a7d53 100644
--- a/sound/soc/codecs/wm8997.c
+++ b/sound/soc/codecs/wm8997.c
@@ -1187,6 +1187,7 @@ static int wm8997_probe(struct platform_device *pdev)
 err_spk_irqs:
 	arizona_free_spk_irqs(arizona);
 err_jack_codec_dev:
+	pm_runtime_disable(&pdev->dev);
 	arizona_jack_codec_dev_remove(&wm8997->core);
 
 	return ret;
-- 
2.25.1


  reply	other threads:[~2022-09-29 15:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 15:06 [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe Zhang Qilong
2022-09-29 15:06 ` Zhang Qilong
2022-09-29 15:06 ` Zhang Qilong [this message]
2022-09-29 15:06   ` [PATCH v2 -next 1/4] ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe Zhang Qilong
2022-10-03 10:05   ` Charles Keepax
2022-10-03 10:05     ` Charles Keepax
2022-09-29 15:06 ` [PATCH v2 -next 2/4] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe Zhang Qilong
2022-09-29 15:06   ` Zhang Qilong
2022-10-03 10:05   ` Charles Keepax
2022-10-03 10:05     ` Charles Keepax
2022-09-29 15:06 ` [PATCH v2 -next 3/4] ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe Zhang Qilong
2022-09-29 15:06   ` Zhang Qilong
2022-10-03 10:05   ` Charles Keepax
2022-10-03 10:05     ` Charles Keepax
2022-09-29 15:06 ` [PATCH v2 -next 4/4] ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe Zhang Qilong
2022-09-29 15:06   ` Zhang Qilong
2022-09-30  8:39   ` AngeloGioacchino Del Regno
2022-09-30  8:39     ` AngeloGioacchino Del Regno
2022-10-03 17:37   ` [PATCH v2 " Mark Brown
2022-10-03 17:37     ` Mark Brown
2022-10-03 16:47 ` [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe Mark Brown
2022-10-03 16:47   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220929150653.63845-2-zhangqilong3@huawei.com \
    --to=zhangqilong3@huawei.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=jeff_chang@richtek.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.