Skip to content

Commit

Permalink
ASoC: fsl_aud2htx: Add error handler for pm_runtime_enable
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
TE-N-ShengjiuWang authored and broonie committed Aug 25, 2022
1 parent ea532c2 commit b1cd3fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/fsl/fsl_aud2htx.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ static int fsl_aud2htx_probe(struct platform_device *pdev)
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
if (ret) {
dev_err(&pdev->dev, "failed to pcm register\n");
pm_runtime_disable(&pdev->dev);
return ret;
}

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

Expand Down

0 comments on commit b1cd3fd

Please sign in to comment.