aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_port.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/tty_port.c')
-rw-r--r--drivers/char/tty_port.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c
index 553b0e9d8d17..c8f8024cb40e 100644
--- a/drivers/char/tty_port.c
+++ b/drivers/char/tty_port.c
@@ -90,7 +90,7 @@ void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty)
90 spin_lock_irqsave(&port->lock, flags); 90 spin_lock_irqsave(&port->lock, flags);
91 if (port->tty) 91 if (port->tty)
92 tty_kref_put(port->tty); 92 tty_kref_put(port->tty);
93 port->tty = tty; 93 port->tty = tty_kref_get(tty);
94 spin_unlock_irqrestore(&port->lock, flags); 94 spin_unlock_irqrestore(&port->lock, flags);
95} 95}
96EXPORT_SYMBOL(tty_port_tty_set); 96EXPORT_SYMBOL(tty_port_tty_set);