From feeddb339e1e9670e436f5f6328d958941727875 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Wed, 29 Nov 2006 12:45:29 +0100 Subject: 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. Signed-off-by: Oliver Neukum Signed-off-by: Adrian Bunk --- 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 d34848ac30b0..cc03f6875ed0 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c @@ -700,6 +700,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 -- cgit v1.2.3