aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2010-05-15 11:53:44 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:48 -0400
commit56a1df46c19150db0a9b0f0c14e0b1d42e7f32d4 (patch)
treea46afa9a17f75a420599ecb85d194d68e3136dbf /drivers/usb/serial
parentc0f631d1948658b27349545b2cbcb4b32f010c7a (diff)
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 <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/generic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index fcd30b841559..a817ced82835 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)
324 char *ch = (char *)urb->transfer_buffer; 324 char *ch = (char *)urb->transfer_buffer;
325 int i; 325 int i;
326 326
327 if (!urb->actual_length)
328 return;
329
327 tty = tty_port_tty_get(&port->port); 330 tty = tty_port_tty_get(&port->port);
328 if (!tty) 331 if (!tty)
329 return; 332 return;