summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2010-05-15 17:53:44 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 13:21:48 -0700
commit56a1df46c19150db0a9b0f0c14e0b1d42e7f32d4 (patch)
treea46afa9a17f75a420599ecb85d194d68e3136dbf /drivers/usb/serial
parentc0f631d1948658b27349545b2cbcb4b32f010c7a (diff)
downloadlinux-56a1df46c19150db0a9b0f0c14e0b1d42e7f32d4.tar.bz2
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)
char *ch = (char *)urb->transfer_buffer;
int i;
+ if (!urb->actual_length)
+ return;
+
tty = tty_port_tty_get(&port->port);
if (!tty)
return;