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>
This commit is contained in:
Johan Hovold 2010-05-15 17:53:44 +02:00 committed by Greg Kroah-Hartman
parent c0f631d194
commit 56a1df46c1

View File

@ -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;