* [PATCH] ASoC: dapm: Add missing mutex unlock
@ 2015-05-08 9:50 Charles Keepax
2015-05-08 10:24 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Charles Keepax @ 2015-05-08 9:50 UTC (permalink / raw)
To: broonie; +Cc: alsa-devel, lars, lgirdwood, dan.carpenter, patches
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(-)
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);
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: dapm: Add missing mutex unlock
2015-05-08 9:50 [PATCH] ASoC: dapm: Add missing mutex unlock Charles Keepax
@ 2015-05-08 10:24 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2015-05-08 10:24 UTC (permalink / raw)
To: Charles Keepax; +Cc: alsa-devel, lars, lgirdwood, dan.carpenter, patches
[-- Attachment #1.1: Type: text/plain, Size: 308 bytes --]
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.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-08 10:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-08 9:50 [PATCH] ASoC: dapm: Add missing mutex unlock Charles Keepax
2015-05-08 10:24 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox