Commit 91054598 authored by Jiri Slaby's avatar Jiri Slaby Committed by Takashi Iwai

ALSA: pcm_oss, fix locking typo

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: default avatarJiri Slaby <jirislaby@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 36c7b833
...@@ -2872,7 +2872,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry, ...@@ -2872,7 +2872,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry,
setup = kmalloc(sizeof(*setup), GFP_KERNEL); setup = kmalloc(sizeof(*setup), GFP_KERNEL);
if (! setup) { if (! setup) {
buffer->error = -ENOMEM; buffer->error = -ENOMEM;
mutex_lock(&pstr->oss.setup_mutex); mutex_unlock(&pstr->oss.setup_mutex);
return; return;
} }
if (pstr->oss.setup_list == NULL) if (pstr->oss.setup_list == NULL)
...@@ -2886,7 +2886,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry, ...@@ -2886,7 +2886,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry,
if (! template.task_name) { if (! template.task_name) {
kfree(setup); kfree(setup);
buffer->error = -ENOMEM; buffer->error = -ENOMEM;
mutex_lock(&pstr->oss.setup_mutex); mutex_unlock(&pstr->oss.setup_mutex);
return; return;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment