提交 56a1df46 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

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: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 c0f631d1
...@@ -324,6 +324,9 @@ void usb_serial_generic_process_read_urb(struct urb *urb) ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册