diff options
author | Oliver Neukum <oliver@neukum.name> | 2006-10-28 05:36:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-11-03 14:57:18 -0500 |
commit | 6c8df79f8c0f8d861ea25e6e104a29398d8398f4 (patch) | |
tree | 32b00cd81e9b708c42e892d849a38f3ae779e055 | |
parent | d8fa59a8f6f7c9a1bc294154fd6805c6b247683d (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>
-rw-r--r-- | drivers/usb/class/usblp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 809d465eb257..16353b661a04 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 | |||
722 | usblp->wcomplete = 0; | 722 | usblp->wcomplete = 0; |
723 | err = usb_submit_urb(usblp->writeurb, GFP_KERNEL); | 723 | err = usb_submit_urb(usblp->writeurb, GFP_KERNEL); |
724 | if (err) { | 724 | if (err) { |
725 | usblp->wcomplete = 1; | ||
725 | if (err != -ENOMEM) | 726 | if (err != -ENOMEM) |
726 | count = -EIO; | 727 | count = -EIO; |
727 | else | 728 | else |