Commit ab447e9d authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

Control Midlevel
Fixed the unbalanced spinlock in the error path.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 4f1cb119
......@@ -1114,7 +1114,7 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer, size_t count
wait_queue_t wait;
if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) {
err = -EAGAIN;
goto __end;
goto __end_lock;
}
init_waitqueue_entry(&wait, current);
add_wait_queue(&ctl->change_sleep, &wait);
......@@ -1142,8 +1142,9 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer, size_t count
count -= sizeof(snd_ctl_event_t);
result += sizeof(snd_ctl_event_t);
}
__end:
__end_lock:
spin_unlock_irq(&ctl->read_lock);
__end:
return result > 0 ? result : err;
}
......
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