From: Oliver Neukum Date: Sat, 28 Oct 2006 09:36:59 +0000 (+0200) Subject: USB: failure in usblp's error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6c8df79f8c0f8d861ea25e6e104a29398d8398f4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 809d465eb257..16353b661a04 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c @@ -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