Skip to contentSkip to conversation

ASoC: dapm: Add missing mutex unlock

PATCH Applied Charles Keepax 2 participants 2 messages May 8, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

---
 sound/soc/soc-dapm.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
sound/soc/soc-dapm.c +3 -1
index ea3348e..6374852 100644
@@ -3075,8 +3075,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);
 	}
Signature · 1 line
1.7.2.5
maintainer Applied
#1 lore raw
Quoted 4 lines · Charles Keepax

The is a missing mutex unlock on the error path in snd_soc_dapm_get_enum_double. This was introduced in commit 561ed680b764 ("ASoC: dapm: Add support for autodisable mux controls"). This patch adds the missing unlock.

Applied, thanks.