Skip to content

Commit 77fffa7

Browse files
WillLesterbroonie
authored andcommitted
ASoC: fsl_audmix: add missed pm_runtime_disable
The driver forgets to call pm_runtime_disable in probe failure and remove. Add the missed calls to fix it. Signed-off-by: Chuhong Yuan <[email protected]> Acked-by: Nicolin Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3b76586 commit 77fffa7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

sound/soc/fsl/fsl_audmix.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,22 +505,29 @@ static int fsl_audmix_probe(struct platform_device *pdev)
505505
ARRAY_SIZE(fsl_audmix_dai));
506506
if (ret) {
507507
dev_err(dev, "failed to register ASoC DAI\n");
508-
return ret;
508+
goto err_disable_pm;
509509
}
510510

511511
priv->pdev = platform_device_register_data(dev, mdrv, 0, NULL, 0);
512512
if (IS_ERR(priv->pdev)) {
513513
ret = PTR_ERR(priv->pdev);
514514
dev_err(dev, "failed to register platform %s: %d\n", mdrv, ret);
515+
goto err_disable_pm;
515516
}
516517

518+
return 0;
519+
520+
err_disable_pm:
521+
pm_runtime_disable(dev);
517522
return ret;
518523
}
519524

520525
static int fsl_audmix_remove(struct platform_device *pdev)
521526
{
522527
struct fsl_audmix *priv = dev_get_drvdata(&pdev->dev);
523528

529+
pm_runtime_disable(&pdev->dev);
530+
524531
if (priv->pdev)
525532
platform_device_unregister(priv->pdev);
526533

0 commit comments

Comments
 (0)