aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/max310x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/max310x.c')
-rw-r--r--drivers/tty/serial/max310x.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index a801f6872cad..0c2422cb04ea 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -460,10 +460,6 @@ static int max310x_set_ref_clk(struct max310x_port *s)
460static void max310x_handle_rx(struct max310x_port *s, unsigned int rxlen) 460static void max310x_handle_rx(struct max310x_port *s, unsigned int rxlen)
461{ 461{
462 unsigned int sts = 0, ch = 0, flag; 462 unsigned int sts = 0, ch = 0, flag;
463 struct tty_struct *tty = tty_port_tty_get(&s->port.state->port);
464
465 if (!tty)
466 return;
467 463
468 if (unlikely(rxlen >= MAX310X_FIFO_SIZE)) { 464 if (unlikely(rxlen >= MAX310X_FIFO_SIZE)) {
469 dev_warn(s->port.dev, "Possible RX FIFO overrun %d\n", rxlen); 465 dev_warn(s->port.dev, "Possible RX FIFO overrun %d\n", rxlen);
@@ -516,9 +512,7 @@ static void max310x_handle_rx(struct max310x_port *s, unsigned int rxlen)
516 ch, flag); 512 ch, flag);
517 } 513 }
518 514
519 tty_flip_buffer_push(tty); 515 tty_flip_buffer_push(&s->port.state->port);
520
521 tty_kref_put(tty);
522} 516}
523 517
524static void max310x_handle_tx(struct max310x_port *s) 518static void max310x_handle_tx(struct max310x_port *s)