summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-05-14 17:10:53 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-14 18:11:38 +0200
commit9934025c4d6649c7e51e119db0f190793712fb85 (patch)
tree369cefa7fe511f5c38f68c855a84486adbc4d281 /sound/soc
parentb3461ccaa5d2588568d865faee285512ad448049 (diff)
downloadlinux-stable-9934025c4d6649c7e51e119db0f190793712fb85.tar.gz
linux-stable-9934025c4d6649c7e51e119db0f190793712fb85.tar.bz2
linux-stable-9934025c4d6649c7e51e119db0f190793712fb85.zip
ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition()
[ Upstream commit be2af740e2a9c7134f2d8ab4f104006e110b13de ] Fix the missing clk_disable_unprepare() before return from wm2000_anc_transition() in the error handling case. Fixes: 514cfd6dd725 ("ASoC: wm2000: Integrate with clock API") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220514091053.686416-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm2000.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index 72e165cc6443..97ece3114b3d 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -536,7 +536,7 @@ static int wm2000_anc_transition(struct wm2000_priv *wm2000,
{
struct i2c_client *i2c = wm2000->i2c;
int i, j;
- int ret;
+ int ret = 0;
if (wm2000->anc_mode == mode)
return 0;
@@ -566,13 +566,13 @@ static int wm2000_anc_transition(struct wm2000_priv *wm2000,
ret = anc_transitions[i].step[j](i2c,
anc_transitions[i].analogue);
if (ret != 0)
- return ret;
+ break;
}
if (anc_transitions[i].dest == ANC_OFF)
clk_disable_unprepare(wm2000->mclk);
- return 0;
+ return ret;
}
static int wm2000_anc_set_mode(struct wm2000_priv *wm2000)