ALSA: pcm_oss, fix locking typo
authorJiri Slaby <jirislaby@gmail.com>
Wed, 11 Mar 2009 19:11:40 +0000 (20:11 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 18 Mar 2009 07:03:33 +0000 (08:03 +0100)
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>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_oss.c

index 0a1798eafb0b5400a0cceea85c072aa0e805f31a..699d2890535ccb9a5280ce6173980308602d6c26 100644 (file)
@@ -2872,7 +2872,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry,
                        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(struct snd_info_entry *entry,
                        if (! template.task_name) {
                                kfree(setup);
                                buffer->error = -ENOMEM;
-                               mutex_lock(&pstr->oss.setup_mutex);
+                               mutex_unlock(&pstr->oss.setup_mutex);
                                return;
                        }
                }