浏览代码

Char: nozomi, fix tty->count counting

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>
Jiri Slaby 15 年之前
父节点
当前提交
ee78bb95b7
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/char/nozomi.c

+ 1 - 0
drivers/char/nozomi.c

@@ -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;