Commit 6c8df79f authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

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: default avatarOliver Neukum <oliver@neukum.name>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d8fa59a8
...@@ -722,6 +722,7 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t ...@@ -722,6 +722,7 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t
usblp->wcomplete = 0; usblp->wcomplete = 0;
err = usb_submit_urb(usblp->writeurb, GFP_KERNEL); err = usb_submit_urb(usblp->writeurb, GFP_KERNEL);
if (err) { if (err) {
usblp->wcomplete = 1;
if (err != -ENOMEM) if (err != -ENOMEM)
count = -EIO; count = -EIO;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment