[PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe
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. --- v2: - call pm_runtime_disable when error returns.
Zhang Qilong (4): ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe
sound/soc/codecs/mt6660.c | 3 +++ sound/soc/codecs/wm5102.c | 1 + sound/soc/codecs/wm5110.c | 1 + sound/soc/codecs/wm8997.c | 1 + 4 files changed, 6 insertions(+)
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;
On Thu, Sep 29, 2022 at 11:06:50PM +0800, Zhang Qilong wrote:
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
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
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_enable when error returns.
Fixes:5c6af635fd772 ("ASoC: wm5110: Add audio CODEC driver") Signed-off-by: Zhang Qilong zhangqilong3@huawei.com --- v2: - call pm_runtime_disable when error returns. --- sound/soc/codecs/wm5110.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index f3f4a10bf0f7..e0b971620d0f 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -2500,6 +2500,7 @@ static int wm5110_probe(struct platform_device *pdev) arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 0); arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, wm5110); err_jack_codec_dev: + pm_runtime_disable(&pdev->dev); arizona_jack_codec_dev_remove(&wm5110->core);
return ret;
On Thu, Sep 29, 2022 at 11:06:51PM +0800, Zhang Qilong wrote:
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_enable when error returns.
Fixes:5c6af635fd772 ("ASoC: wm5110: Add audio CODEC driver") Signed-off-by: Zhang Qilong zhangqilong3@huawei.com
v2:
- call pm_runtime_disable when error returns.
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
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:93e8791dd34ca ("ASoC: wm5102: Initial driver") Signed-off-by: Zhang Qilong zhangqilong3@huawei.com --- v2: - call pm_runtime_disable when error returns --- sound/soc/codecs/wm5102.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index af7d324e3352..adaf886b0a9d 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c @@ -2142,6 +2142,7 @@ static int wm5102_probe(struct platform_device *pdev) arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 0); arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, wm5102); err_jack_codec_dev: + pm_runtime_disable(&pdev->dev); arizona_jack_codec_dev_remove(&wm5102->core);
return ret;
On Thu, Sep 29, 2022 at 11:06:52PM +0800, Zhang Qilong wrote:
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:93e8791dd34ca ("ASoC: wm5102: Initial driver") Signed-off-by: Zhang Qilong zhangqilong3@huawei.com
v2:
- call pm_runtime_disable when error returns
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
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:f289e55c6eeb4 ("ASoC: Add MediaTek MT6660 Speaker Amp Driver") Signed-off-by: Zhang Qilong zhangqilong3@huawei.com --- v2: - call pm_runtime_disable when error returns --- sound/soc/codecs/mt6660.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/sound/soc/codecs/mt6660.c b/sound/soc/codecs/mt6660.c index 4971cd0b90f8..36220a1f80a6 100644 --- a/sound/soc/codecs/mt6660.c +++ b/sound/soc/codecs/mt6660.c @@ -509,6 +509,9 @@ static int mt6660_i2c_probe(struct i2c_client *client) ret = devm_snd_soc_register_component(chip->dev, &mt6660_component_driver, &mt6660_codec_dai, 1); + if (ret) + pm_runtime_disable(chip->dev); + return ret; probe_fail: _mt6660_chip_power_on(chip, 0);
Il 29/09/22 17:06, Zhang Qilong ha scritto:
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:f289e55c6eeb4 ("ASoC: Add MediaTek MT6660 Speaker Amp Driver") Signed-off-by: Zhang Qilong zhangqilong3@huawei.com
Reviewed-by: AngeloGioacchino Del Regno angelogioacchino.delregno@collabora.com
On Thu, Sep 29, 2022 at 11:06:53PM +0800, Zhang Qilong wrote:
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.
This doesn't apply against current code, please check and resend.
On Thu, 29 Sep 2022 23:06:49 +0800, Zhang Qilong wrote:
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.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/4] ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe commit: 41a736ac20602f64773e80f0f5b32cde1830a44a [2/4] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe commit: 86b46bf1feb83898d89a2b4a8d08d21e9ea277a7 [3/4] ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe commit: fcbb60820cd3008bb44334a0395e5e57ccb77329 [4/4] ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe commit: b73f11e895e140537e7f8c7251211ccd3ce0782b
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (4)
-
AngeloGioacchino Del Regno
-
Charles Keepax
-
Mark Brown
-
Zhang Qilong