ASoC: rk3328: fix disabling mclk on pclk probe failure

[ Upstream commit dd508e324c ]

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: c32759035a ("ASoC: rockchip: support ACODEC for rk3328")
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Reviewed-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
Link: https://lore.kernel.org/r/20220427172310.138638-1-frattaroli.nicolas@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Nicolas Frattaroli 2022-04-27 19:23:11 +02:00 committed by Greg Kroah-Hartman
parent 81ea24d5b8
commit bd1b0ee60b
1 changed files with 1 additions and 1 deletions

View File

@ -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);