Message ID | 1431078610-4150-1-git-send-email-ckeepax@opensource.wolfsonmicro.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 964a0b896a7c78622801afcee77ed3d240352747 |
Headers | show |
On Fri, May 08, 2015 at 10:50:10AM +0100, Charles Keepax wrote: > 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.
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index ea3348e..6374852 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -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, ®_val); - if (ret) + if (ret) { + mutex_unlock(&card->dapm_mutex); return ret; + } } else { reg_val = dapm_kcontrol_get_value(kcontrol); }
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. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> --- sound/soc/soc-dapm.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)