| From 91054598f794fb5d8a0b1e747ff8e2e8fc2115b3 Mon Sep 17 00:00:00 2001 |
| From: Jiri Slaby <jirislaby@gmail.com> |
| Date: Wed, 11 Mar 2009 20:11:40 +0100 |
| Subject: ALSA: pcm_oss, fix locking typo |
| |
| From: Jiri Slaby <jirislaby@gmail.com> |
| |
| commit 91054598f794fb5d8a0b1e747ff8e2e8fc2115b3 upstream. |
| |
| s/mutex_lock/mutex_unlock/ on 2 fail paths in snd_pcm_oss_proc_write. |
| Probably a typo, lock should be unlocked when leaving the function. |
| |
| Signed-off-by: Jiri Slaby <jirislaby@gmail.com> |
| Signed-off-by: Takashi Iwai <tiwai@suse.de> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
| |
| --- |
| sound/core/oss/pcm_oss.c | 4 ++-- |
| 1 file changed, 2 insertions(+), 2 deletions(-) |
| |
| --- a/sound/core/oss/pcm_oss.c |
| +++ b/sound/core/oss/pcm_oss.c |
| @@ -2872,7 +2872,7 @@ static void snd_pcm_oss_proc_write(struc |
| setup = kmalloc(sizeof(*setup), GFP_KERNEL); |
| if (! setup) { |
| buffer->error = -ENOMEM; |
| - mutex_lock(&pstr->oss.setup_mutex); |
| + mutex_unlock(&pstr->oss.setup_mutex); |
| return; |
| } |
| if (pstr->oss.setup_list == NULL) |
| @@ -2886,7 +2886,7 @@ static void snd_pcm_oss_proc_write(struc |
| if (! template.task_name) { |
| kfree(setup); |
| buffer->error = -ENOMEM; |
| - mutex_lock(&pstr->oss.setup_mutex); |
| + mutex_unlock(&pstr->oss.setup_mutex); |
| return; |
| } |
| } |