Commit dd508e32 authored by Nicolas Frattaroli's avatar Nicolas Frattaroli Committed by Mark Brown

ASoC: rk3328: fix disabling mclk on pclk probe failure

If preparing/enabling the pclk fails, the probe function should
unprepare and disable the previously prepared and enabled mclk,
which it doesn't do. This commit rectifies this.

Fixes: c3275903 ("ASoC: rockchip: support ACODEC for rk3328")
Signed-off-by: default avatarNicolas Frattaroli <frattaroli.nicolas@gmail.com>
Reviewed-by: default avatarKatsuhiro Suzuki <katsuhiro@katsuster.net>
Link: https://lore.kernel.org/r/20220427172310.138638-1-frattaroli.nicolas@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7e0bdbae
......@@ -481,7 +481,7 @@ static int rk3328_platform_probe(struct platform_device *pdev)
ret = clk_prepare_enable(rk3328->pclk);
if (ret < 0) {
dev_err(&pdev->dev, "failed to enable acodec pclk\n");
return ret;
goto err_unprepare_mclk;
}
base = devm_platform_ioremap_resource(pdev, 0);
......
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