* [PATCH v2] ASoC: fsl: Fix PM disable depth imbalance in fsl_easrc_probe
@ 2023-10-12 13:03 Zhang Shurong
2023-10-24 13:55 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Shurong @ 2023-10-12 13:03 UTC (permalink / raw)
To: shengjiu.wang
Cc: Xiubo.Lee, festevam, nicoleotsuka, lgirdwood, broonie, perex,
tiwai, alsa-devel, linuxppc-dev, linux-kernel, Zhang Shurong
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: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers")
Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com>
---
v1->v2: add Fixes tag
sound/soc/fsl/fsl_easrc.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c
index ba62995c909a..ec53bda46a46 100644
--- a/sound/soc/fsl/fsl_easrc.c
+++ b/sound/soc/fsl/fsl_easrc.c
@@ -1966,17 +1966,21 @@ static int fsl_easrc_probe(struct platform_device *pdev)
&fsl_easrc_dai, 1);
if (ret) {
dev_err(dev, "failed to register ASoC DAI\n");
- return ret;
+ goto err_pm_disable;
}
ret = devm_snd_soc_register_component(dev, &fsl_asrc_component,
NULL, 0);
if (ret) {
dev_err(&pdev->dev, "failed to register ASoC platform\n");
- return ret;
+ goto err_pm_disable;
}
return 0;
+
+err_pm_disable:
+ pm_runtime_disable(&pdev->dev);
+ return ret;
}
static void fsl_easrc_remove(struct platform_device *pdev)
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v2] ASoC: fsl: Fix PM disable depth imbalance in fsl_easrc_probe
2023-10-12 13:03 [PATCH v2] ASoC: fsl: Fix PM disable depth imbalance in fsl_easrc_probe Zhang Shurong
@ 2023-10-24 13:55 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-10-24 13:55 UTC (permalink / raw)
To: shengjiu.wang, Zhang Shurong
Cc: Xiubo.Lee, festevam, nicoleotsuka, lgirdwood, perex, tiwai,
alsa-devel, linuxppc-dev, linux-kernel
On Thu, 12 Oct 2023 21:03:15 +0800, Zhang Shurong 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/1] ASoC: fsl: Fix PM disable depth imbalance in fsl_easrc_probe
commit: 9e630efb5a4af56fdb15aa10405f5cfd3f5f5b83
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-24 13:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-12 13:03 [PATCH v2] ASoC: fsl: Fix PM disable depth imbalance in fsl_easrc_probe Zhang Shurong
2023-10-24 13:55 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®