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: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
This commit is contained in:
Oliver Neukum
2006-11-29 12:45:29 +01:00
committed by Adrian Bunk
parent 193d2e39e1
commit feeddb339e
+1
View File
@@ -700,6 +700,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