Commit 964a0b89 authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown

ASoC: dapm: Add missing mutex unlock

The is a missing mutex unlock on the error path in
snd_soc_dapm_get_enum_double. This was introduced in commit
561ed680 ("ASoC: dapm: Add support for autodisable mux controls").
This patch adds the missing unlock.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d714f97c
...@@ -3069,8 +3069,10 @@ int snd_soc_dapm_get_enum_double(struct snd_kcontrol *kcontrol, ...@@ -3069,8 +3069,10 @@ int snd_soc_dapm_get_enum_double(struct snd_kcontrol *kcontrol,
mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
if (e->reg != SND_SOC_NOPM && dapm_kcontrol_is_powered(kcontrol)) { if (e->reg != SND_SOC_NOPM && dapm_kcontrol_is_powered(kcontrol)) {
int ret = soc_dapm_read(dapm, e->reg, &reg_val); int ret = soc_dapm_read(dapm, e->reg, &reg_val);
if (ret) if (ret) {
mutex_unlock(&card->dapm_mutex);
return ret; return ret;
}
} else { } else {
reg_val = dapm_kcontrol_get_value(kcontrol); reg_val = dapm_kcontrol_get_value(kcontrol);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment