Commit feeddb33 authored by Oliver Neukum's avatar Oliver Neukum Committed by Adrian Bunk

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.
Signed-off-by: default avatarOliver Neukum <oliver@neukum.name>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 193d2e39
...@@ -700,6 +700,7 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t ...@@ -700,6 +700,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