mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 07:01:57 +00:00
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:
parent
d8fa59a8f6
commit
6c8df79f8c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user