Commit fa478816 authored by Oliver Neukum's avatar Oliver Neukum Committed by Chris Wright

[PATCH] USB: failure in usblp's error path

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>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
parent 9bc1aba2
......@@ -701,6 +701,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
......
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