diff options
author | Andrew Morton <akpm@osdl.org> | 2004-07-01 20:36:58 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-01 20:36:58 -0700 |
commit | d2644a78578cdf0a619e604db552af2bcbf2ea13 (patch) | |
tree | 17e11c04628e0770b692dfdbf7ff6b91b198e11b /sound | |
parent | 4d7eb89510ff6b115522757c405f678d789f70e6 (diff) | |
download | history-d2644a78578cdf0a619e604db552af2bcbf2ea13.tar.gz |
[PATCH] [err1-25] snd_ctl_read() locking fix
From the new Stanford locking checker
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/control.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 7cc19394dae895..df757e20d35049 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -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 __end; + goto out; } init_waitqueue_entry(&wait, current); add_wait_queue(&ctl->change_sleep, &wait); @@ -1144,8 +1144,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: spin_unlock_irq(&ctl->read_lock); +out: return result > 0 ? result : err; } |