Skip to content

Commit

Permalink
Char: nozomi, fix tty->count counting
Browse files Browse the repository at this point in the history
Currently ntty_install omits to increment tty count and we get the
following warnings:
Warning: dev (noz2) tty->count(0) != #fd's(1) in tty_open

So to fix that, add one tty->count++ there.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org> [.34, .35]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent e38018b commit ee78bb9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/char/nozomi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1611,6 +1611,7 @@ static int ntty_install(struct tty_driver *driver, struct tty_struct *tty)
ret = tty_init_termios(tty);
if (ret == 0) {
tty_driver_kref_get(driver);
tty->count++;
driver->ttys[tty->index] = tty;
}
return ret;
Expand Down

0 comments on commit ee78bb9

Please sign in to comment.