[PATCH] USB: usblp: 2x up() in usblp_read
authorDomen Puncer <domen@coderock.org>
Sun, 5 Jun 2005 12:46:16 +0000 (14:46 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Jun 2005 21:44:02 +0000 (14:44 -0700)
up(&usblp->sem) was called twice in a row in this code path.

Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/class/usblp.c

index dff134185c18a94612f313fce8428733360ec18d..7ce43fb8118a3b79e969711606390bdaafee96e5 100644 (file)
@@ -753,6 +753,7 @@ static ssize_t usblp_read(struct file *file, char __user *buffer, size_t count,
                                schedule();
                        } else {
                                set_current_state(TASK_RUNNING);
+                               down(&usblp->sem);
                                break;
                        }
                        down (&usblp->sem);