aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/class/usblp.c
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.name>2006-10-28 11:36:59 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2006-11-03 11:57:18 -0800
commit6c8df79f8c0f8d861ea25e6e104a29398d8398f4 (patch)
tree32b00cd81e9b708c42e892d849a38f3ae779e055 /drivers/usb/class/usblp.c
parentd8fa59a8f6f7c9a1bc294154fd6805c6b247683d (diff)
USB: failure in usblp's error path
if urb submission fails due to a transient error here eg. ENOMEM , the driver is dead. This fixes it. Regards Oliver Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class/usblp.c')
-rw-r--r--drivers/usb/class/usblp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 809d465eb25..16353b661a0 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -722,6 +722,7 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t
usblp->wcomplete = 0;
err = usb_submit_urb(usblp->writeurb, GFP_KERNEL);
if (err) {
+ usblp->wcomplete = 1;
if (err != -ENOMEM)
count = -EIO;
else