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>
This commit is contained in:
Oliver Neukum 2006-10-28 11:36:59 +02:00 committed by Greg Kroah-Hartman
parent d8fa59a8f6
commit 6c8df79f8c
1 changed files with 1 additions and 0 deletions

View File

@ -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