From 01205a0e60bb5a66d768b881fb8355981b912510 Mon Sep 17 00:00:00 2001
From: Domen Puncer <domen@coderock.org>
Date: Sun, 5 Jun 2005 14:46:16 +0200
Subject: [PATCH] [PATCH] USB: usblp: 2x up() in usblp_read

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index dff134185c18..7ce43fb8118a 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -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);
-- 
GitLab