diff options
author | Nicolas Frattaroli <frattaroli.nicolas@gmail.com> | 2022-04-27 20:23:11 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-05-03 15:43:36 +0300 |
commit | 35a9b000b24d512228d4513dc55f5767b015bc73 (patch) | |
tree | 37e01a989c534cd012f8a4bb5926ca8d54389e0d /sound/soc/codecs/rk3328_codec.c | |
parent | c7b92395836c3962eedbe6b4f58f9dfb2b2cc921 (diff) | |
download | linux-35a9b000b24d512228d4513dc55f5767b015bc73.tar.xz |
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: c32759035ad2 ("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>
Diffstat (limited to 'sound/soc/codecs/rk3328_codec.c')
-rw-r--r-- | sound/soc/codecs/rk3328_codec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/rk3328_codec.c b/sound/soc/codecs/rk3328_codec.c index 758d439e8c7a..86b679cf7aef 100644 --- a/sound/soc/codecs/rk3328_codec.c +++ b/sound/soc/codecs/rk3328_codec.c @@ -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); |