Commit da0504fc authored by Wen-chien Jesse Sung's avatar Wen-chien Jesse Sung Committed by Linus Torvalds

[PATCH] snd_ctl_read() fix fix

hm, I had a brainfart here.  The recent "fix" to snd_ctl_read() actually
unfixed it.  Revert that, and fix the real bug.

Cc: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c105abb3
......@@ -1116,7 +1116,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 out;
goto __end;
}
init_waitqueue_entry(&wait, current);
add_wait_queue(&ctl->change_sleep, &wait);
......@@ -1137,7 +1137,7 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer, size_t count
kfree(kev);
if (copy_to_user(buffer, &ev, sizeof(snd_ctl_event_t))) {
err = -EFAULT;
goto __end;
goto out;
}
spin_lock_irq(&ctl->read_lock);
buffer += sizeof(snd_ctl_event_t);
......
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