Skip to content

Commit

Permalink
ALSA: pcm_oss, fix locking typo
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Takashi Iwai committed Mar 18, 2009
1 parent 36c7b83 commit 9105459
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/core/oss/pcm_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 9105459

Please sign in to comment.