From 5f7c0a66693a059ddaef721a705134b067abbe85 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 12 Jul 2012 12:59:17 +0100 Subject: [PATCH] --- yaml --- r: 325603 b: refs/heads/master c: 000c74d9fa14ec61411310187cfa9e43581593b5 h: refs/heads/master i: 325601: 51abe07a305ada708cca1fe24867370567f36de0 325599: ed92331c3fb46d5be1d00ab5a52c1daa31957146 v: v3 --- [refs] | 2 +- trunk/drivers/usb/serial/metro-usb.c | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 49925da3f41a..ebdf4a8622ce 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 79d753209245de3d6f02480535a8f5cf21ad02f7 +refs/heads/master: 000c74d9fa14ec61411310187cfa9e43581593b5 diff --git a/trunk/drivers/usb/serial/metro-usb.c b/trunk/drivers/usb/serial/metro-usb.c index 81423f7361db..bad5f0cb7ae8 100644 --- a/trunk/drivers/usb/serial/metro-usb.c +++ b/trunk/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);