mirror of
https://github.com/torvalds/linux
synced 2024-09-22 12:26:27 +00:00
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:
parent
c0f631d194
commit
56a1df46c1
|
@ -324,6 +324,9 @@ void usb_serial_generic_process_read_urb(struct urb *urb)
|
||||||
char *ch = (char *)urb->transfer_buffer;
|
char *ch = (char *)urb->transfer_buffer;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (!urb->actual_length)
|
||||||
|
return;
|
||||||
|
|
||||||
tty = tty_port_tty_get(&port->port);
|
tty = tty_port_tty_get(&port->port);
|
||||||
if (!tty)
|
if (!tty)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue