aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cypress_m8.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/cypress_m8.c')
-rw-r--r--drivers/usb/serial/cypress_m8.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 22837a3f2f89..f3514a91f915 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -1286,7 +1286,7 @@ static void cypress_read_int_callback(struct urb *urb)
1286 } 1286 }
1287 spin_unlock_irqrestore(&priv->lock, flags); 1287 spin_unlock_irqrestore(&priv->lock, flags);
1288 1288
1289 tty = port->port.tty; 1289 tty = tty_port_tty_get(&port->port);
1290 if (!tty) { 1290 if (!tty) {
1291 dbg("%s - bad tty pointer - exiting", __func__); 1291 dbg("%s - bad tty pointer - exiting", __func__);
1292 return; 1292 return;
@@ -1362,7 +1362,7 @@ static void cypress_read_int_callback(struct urb *urb)
1362 data[i]); 1362 data[i]);
1363 tty_insert_flip_char(tty, data[i], tty_flag); 1363 tty_insert_flip_char(tty, data[i], tty_flag);
1364 } 1364 }
1365 tty_flip_buffer_push(port->port.tty); 1365 tty_flip_buffer_push(tty);
1366 } 1366 }
1367 1367
1368 spin_lock_irqsave(&priv->lock, flags); 1368 spin_lock_irqsave(&priv->lock, flags);
@@ -1371,6 +1371,7 @@ static void cypress_read_int_callback(struct urb *urb)
1371 spin_unlock_irqrestore(&priv->lock, flags); 1371 spin_unlock_irqrestore(&priv->lock, flags);
1372 1372
1373continue_read: 1373continue_read:
1374 tty_kref_put(tty);
1374 1375
1375 /* Continue trying to always read... unless the port has closed. */ 1376 /* Continue trying to always read... unless the port has closed. */
1376 1377