Message ID | 1544624031-25788-2-git-send-email-woodrow.shen@canonical.com |
---|---|
State | New |
Headers | show |
Series | [SRU,Cosmic,Bionic,v1,1/1] tty: do not set TTY_IO_ERROR flag if console port | expand |
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index 25d7368..c699d41 100644 --- a/drivers/tty/tty_port.c +++ b/drivers/tty/tty_port.c @@ -640,7 +640,8 @@ void tty_port_close(struct tty_port *port, struct tty_struct *tty, if (tty_port_close_start(port, tty, filp) == 0) return; tty_port_shutdown(port, tty); - set_bit(TTY_IO_ERROR, &tty->flags); + if (!port->console) + set_bit(TTY_IO_ERROR, &tty->flags); tty_port_close_end(port, tty); tty_port_tty_set(port, NULL); }