Skip to content

Commit 9105459

Browse files
jirislabytiwai
authored andcommitted
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: Jiri Slaby <jirislaby@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 36c7b83 commit 9105459

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎sound/core/oss/pcm_oss.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2872,7 +2872,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry,
28722872
setup = kmalloc(sizeof(*setup), GFP_KERNEL);
28732873
if (! setup) {
28742874
buffer->error = -ENOMEM;
2875-
mutex_lock(&pstr->oss.setup_mutex);
2875+
mutex_unlock(&pstr->oss.setup_mutex);
28762876
return;
28772877
}
28782878
if (pstr->oss.setup_list == NULL)
@@ -2886,7 +2886,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry,
28862886
if (! template.task_name) {
28872887
kfree(setup);
28882888
buffer->error = -ENOMEM;
2889-
mutex_lock(&pstr->oss.setup_mutex);
2889+
mutex_unlock(&pstr->oss.setup_mutex);
28902890
return;
28912891
}
28922892
}

0 commit comments

Comments
 (0)