@@ -374,7 +374,6 @@ static int imx8_acm_clk_probe(struct platform_device *pdev)
0, NULL, NULL);
if (IS_ERR(hws[sels[i].clkid])) {
ret = PTR_ERR(hws[sels[i].clkid]);
- pm_runtime_disable(&pdev->dev);
goto err_clk_register;
}
}
@@ -384,12 +383,16 @@ static int imx8_acm_clk_probe(struct platform_device *pdev)
ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, clk_hw_data);
if (ret < 0) {
dev_err(dev, "failed to register hws for ACM\n");
- pm_runtime_disable(&pdev->dev);
+ goto err_clk_register;
}
-err_clk_register:
+ pm_runtime_put_sync(&pdev->dev);
+ return 0;
+err_clk_register:
pm_runtime_put_sync(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
+ clk_imx_acm_detach_pm_domains(&pdev->dev, &priv->dev_pm);
return ret;
}