From: Alan Cox Date: Tue, 21 Oct 2008 12:47:44 +0000 (+0100) Subject: tty: Fix tty_port kref screwup X-Git-Tag: v2.6.28-rc1~47 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=cb4bca3540535a15705b50bdaea4fe2fddd183b3;p=linux-2.6-omap-h63xx.git tty: Fix tty_port kref screwup Pass the brown paper bags please. I changed the semantics of this so the function was supposed to do the extra kref itself then forgot to do the change.. duh.... Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c index 553b0e9d8d1..c8f8024cb40 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) spin_lock_irqsave(&port->lock, flags); if (port->tty) tty_kref_put(port->tty); - port->tty = tty; + port->tty = tty_kref_get(tty); spin_unlock_irqrestore(&port->lock, flags); } EXPORT_SYMBOL(tty_port_tty_set);