mirror of
https://github.com/torvalds/linux.git
synced 2024-11-02 10:11:36 +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;
|
||||
int i;
|
||||
|
||||
if (!urb->actual_length)
|
||||
return;
|
||||
|
||||
tty = tty_port_tty_get(&port->port);
|
||||
if (!tty)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user