From: Oliver Neukum Date: Sat, 28 Oct 2006 09:36:59 +0000 (+0200) Subject: USB: failure in usblp's error path X-Git-Tag: v2.6.19-rc5~27^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6c8df79f8c0f8d861ea25e6e104a29398d8398f4;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Greg Kroah-Hartman --- 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