aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r--drivers/usb/serial/usb-serial.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index aafa684a900..8d518909647 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -339,6 +339,10 @@ static int serial_chars_in_buffer(struct tty_struct *tty)
339 dbg("%s = port %d", __func__, port->number); 339 dbg("%s = port %d", __func__, port->number);
340 340
341 WARN_ON(!port->port.count); 341 WARN_ON(!port->port.count);
342 /* if the device was unplugged then any remaining characters
343 fell out of the connector ;) */
344 if (port->serial->disconnected)
345 return 0;
342 /* pass on to the driver specific version of this function */ 346 /* pass on to the driver specific version of this function */
343 return port->serial->type->chars_in_buffer(tty); 347 return port->serial->type->chars_in_buffer(tty);
344} 348}