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
561ed680b7 ("ASoC: dapm: Add support for autodisable mux controls").
This patch adds the missing unlock.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Charles Keepax 2015-05-08 10:50:10 +01:00 committed by Mark Brown
parent d714f97c5b
commit 964a0b896a
1 changed files with 3 additions and 1 deletions

View File

@ -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);
if (e->reg != SND_SOC_NOPM && dapm_kcontrol_is_powered(kcontrol)) {
int ret = soc_dapm_read(dapm, e->reg, &reg_val);
if (ret)
if (ret) {
mutex_unlock(&card->dapm_mutex);
return ret;
}
} else {
reg_val = dapm_kcontrol_get_value(kcontrol);
}