ASoC: rockchip: pdm: Fix unbalanced clk reference

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ib43aea6590349cddc5b9d8104e723de9e8697f86
This commit is contained in:
Sugar Zhang
2023-07-05 10:19:07 +08:00
parent 1f8e86a5ea
commit 91a11122a7

View File

@@ -1037,6 +1037,8 @@ static int rockchip_pdm_probe(struct platform_device *pdev)
goto err_suspend;
}
clk_disable_unprepare(pdm->hclk);
return 0;
err_suspend:
@@ -1052,15 +1054,10 @@ err_pm_disable:
static int rockchip_pdm_remove(struct platform_device *pdev)
{
struct rk_pdm_dev *pdm = dev_get_drvdata(&pdev->dev);
pm_runtime_disable(&pdev->dev);
if (!pm_runtime_status_suspended(&pdev->dev))
rockchip_pdm_runtime_suspend(&pdev->dev);
clk_disable_unprepare(pdm->clk);
clk_disable_unprepare(pdm->hclk);
return 0;
}