Commit 77fffa74 authored by Chuhong Yuan's avatar Chuhong Yuan Committed by Mark Brown

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: default avatarChuhong Yuan <hslester96@gmail.com>
Acked-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20191203111303.12933-1-hslester96@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3b765867
...@@ -505,15 +505,20 @@ static int fsl_audmix_probe(struct platform_device *pdev) ...@@ -505,15 +505,20 @@ static int fsl_audmix_probe(struct platform_device *pdev)
ARRAY_SIZE(fsl_audmix_dai)); ARRAY_SIZE(fsl_audmix_dai));
if (ret) { if (ret) {
dev_err(dev, "failed to register ASoC DAI\n"); dev_err(dev, "failed to register ASoC DAI\n");
return ret; goto err_disable_pm;
} }
priv->pdev = platform_device_register_data(dev, mdrv, 0, NULL, 0); priv->pdev = platform_device_register_data(dev, mdrv, 0, NULL, 0);
if (IS_ERR(priv->pdev)) { if (IS_ERR(priv->pdev)) {
ret = PTR_ERR(priv->pdev); ret = PTR_ERR(priv->pdev);
dev_err(dev, "failed to register platform %s: %d\n", mdrv, ret); dev_err(dev, "failed to register platform %s: %d\n", mdrv, ret);
goto err_disable_pm;
} }
return 0;
err_disable_pm:
pm_runtime_disable(dev);
return ret; return ret;
} }
...@@ -521,6 +526,8 @@ static int fsl_audmix_remove(struct platform_device *pdev) ...@@ -521,6 +526,8 @@ static int fsl_audmix_remove(struct platform_device *pdev)
{ {
struct fsl_audmix *priv = dev_get_drvdata(&pdev->dev); struct fsl_audmix *priv = dev_get_drvdata(&pdev->dev);
pm_runtime_disable(&pdev->dev);
if (priv->pdev) if (priv->pdev)
platform_device_unregister(priv->pdev); platform_device_unregister(priv->pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment