Skip to content

Commit b1cd3fd

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: fsl_aud2htx: Add error handler for pm_runtime_enable
Call pm_runtime_disable() when error happens in probe() Signed-off-by: Shengjiu Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent ea532c2 commit b1cd3fd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/soc/fsl/fsl_aud2htx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ static int fsl_aud2htx_probe(struct platform_device *pdev)
241241
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
242242
if (ret) {
243243
dev_err(&pdev->dev, "failed to pcm register\n");
244+
pm_runtime_disable(&pdev->dev);
244245
return ret;
245246
}
246247

@@ -249,6 +250,7 @@ static int fsl_aud2htx_probe(struct platform_device *pdev)
249250
&fsl_aud2htx_dai, 1);
250251
if (ret) {
251252
dev_err(&pdev->dev, "failed to register ASoC DAI\n");
253+
pm_runtime_disable(&pdev->dev);
252254
return ret;
253255
}
254256

0 commit comments

Comments
 (0)