diff options
author | Alan Cox <alan@linux.intel.com> | 2012-07-12 12:59:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-12 14:39:19 -0700 |
commit | 000c74d9fa14ec61411310187cfa9e43581593b5 (patch) | |
tree | a4e571b067fb6afa0e6b575f6c9b09a58eccc4fb | |
parent | 79d753209245de3d6f02480535a8f5cf21ad02f7 (diff) | |
download | kernel-common-000c74d9fa14ec61411310187cfa9e43581593b5.tar.gz kernel-common-000c74d9fa14ec61411310187cfa9e43581593b5.tar.bz2 kernel-common-000c74d9fa14ec61411310187cfa9e43581593b5.zip |
usb: fix sillies in the metro USB driver
Bits noticed doing the termios conversion
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/serial/metro-usb.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c index 81423f7361db..bad5f0cb7ae8 100644 --- a/drivers/usb/serial/metro-usb.c +++ b/drivers/usb/serial/metro-usb.c @@ -130,20 +130,14 @@ static void metrousb_read_int_callback(struct urb *urb) /* Set the data read from the usb port into the serial port buffer. */ tty = tty_port_tty_get(&port->port); - if (!tty) { - dev_err(&port->dev, "%s - bad tty pointer - exiting\n", - __func__); - return; - } - if (tty && urb->actual_length) { /* Loop through the data copying each byte to the tty layer. */ tty_insert_flip_string(tty, data, urb->actual_length); /* Force the data to the tty layer. */ tty_flip_buffer_push(tty); + tty_kref_put(tty); } - tty_kref_put(tty); /* Set any port variables. */ spin_lock_irqsave(&metro_priv->lock, flags); |