提交 716da631 编写于 作者: A Alan Cox 提交者: Linus Torvalds

nozomi: Fix close on error

Nozomi assumes the close method isn't called if open errors. The tty layer
is different to other drives in this respect however. Pointed out by Denis J
Barrow.
Signed-off-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0c8946d9
......@@ -1599,7 +1599,10 @@ static int ntty_open(struct tty_struct *tty, struct file *file)
return 0;
}
/* Called when the userspace process close the tty, /dev/noz*. */
/* Called when the userspace process close the tty, /dev/noz*. Also
called immediately if ntty_open fails in which case tty->driver_data
will be NULL an we exit by the first return */
static void ntty_close(struct tty_struct *tty, struct file *file)
{
struct nozomi *dc = get_dc_by_tty(tty);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册