Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
56a1df46 c0f631d1

+3
+3
drivers/usb/serial/generic.c
··· 324 324 char *ch = (char *)urb->transfer_buffer; 325 325 int i; 326 326 327 + if (!urb->actual_length) 328 + return; 329 + 327 330 tty = tty_port_tty_get(&port->port); 328 331 if (!tty) 329 332 return;