Skip to content

Commit

Permalink
ASoC: rk3328: fix disabling mclk on pclk probe failure
Browse files Browse the repository at this point in the history
[ Upstream commit dd508e3 ]

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: c327590 ("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>
  • Loading branch information
CounterPillow authored and gregkh committed Jun 9, 2022
1 parent 81ea24d commit bd1b0ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/rk3328_codec.c
Expand Up @@ -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);
Expand Down

0 comments on commit bd1b0ee

Please sign in to comment.