ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe

Fix the missing clk_disable_unprepare() before return
from rk817_platform_probe() in the error handling case.

Fixes: 0d6a04da9b ("ASoC: Add Rockchip rk817 audio CODEC support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Tested-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20220307090146.4104-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Miaoqian Lin 2022-03-07 09:01:30 +00:00 committed by Mark Brown
parent e45ac7831f
commit a6b44a2518
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 4 additions and 2 deletions

View File

@ -508,12 +508,14 @@ static int rk817_platform_probe(struct platform_device *pdev)
if (ret < 0) {
dev_err(&pdev->dev, "%s() register codec error %d\n",
__func__, ret);
goto err_;
goto err_clk;
}
return 0;
err_:
err_clk:
clk_disable_unprepare(rk817_codec_data->mclk);
err_:
return ret;
}