From 56a1df46c19150db0a9b0f0c14e0b1d42e7f32d4 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Sat, 15 May 2010 17:53:44 +0200 Subject: [PATCH] USB: serial: add special case for processing of empty read urbs Return immediately from generic process_read_urb if urb is empty. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/generic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index fcd30b84155..a817ced8283 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -324,6 +324,9 @@ void usb_serial_generic_process_read_urb(struct urb *urb) char *ch = (char *)urb->transfer_buffer; int i; + if (!urb->actual_length) + return; + tty = tty_port_tty_get(&port->port); if (!tty) return; -- 2.11.4.GIT