Skip to content

Commit

Permalink
USB: failure in usblp's error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Nov 3, 2006
1 parent d8fa59a commit 6c8df79
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/class/usblp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6c8df79

Please sign in to comment.