summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorNicolas Frattaroli <frattaroli.nicolas@gmail.com>2022-04-27 19:23:11 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-14 18:11:34 +0200
commit31de06ef06a8f8f9fa3c1a4f46fa56d50d5c939b (patch)
tree482b7105de8cbda178f1a0d8f93468c63d2db0d3 /sound
parented8d5cf1dcad7a4ea4e71bfc943b351f8e17e83d (diff)
downloadlinux-stable-31de06ef06a8f8f9fa3c1a4f46fa56d50d5c939b.tar.gz
linux-stable-31de06ef06a8f8f9fa3c1a4f46fa56d50d5c939b.tar.bz2
linux-stable-31de06ef06a8f8f9fa3c1a4f46fa56d50d5c939b.zip
ASoC: rk3328: fix disabling mclk on pclk probe failure
[ Upstream commit dd508e324cdde1c06ace08a8143fa50333a90703 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/rk3328_codec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/rk3328_codec.c b/sound/soc/codecs/rk3328_codec.c
index 514ebe16bbfa..4e71ecf54af7 100644
--- a/sound/soc/codecs/rk3328_codec.c
+++ b/sound/soc/codecs/rk3328_codec.c
@@ -479,7 +479,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);