Skip to content

Commit

Permalink
tty: Fix tty_port kref screwup
Browse files Browse the repository at this point in the history
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Oct 23, 2008
1 parent 7dc9b48 commit cb4bca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/tty_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit cb4bca3

Please sign in to comment.