summaryrefslogtreecommitdiff
path: root/drivers/tty/tty_io.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-09 10:37:10 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-09 10:37:10 +0100
commit9b085d6e889076928d307f05cabf76e35db1e63b (patch)
tree89c83eec98ed9bf07d07d8a7b0dea51564ecd61a /drivers/tty/tty_io.c
parent441494ec2a302830357d0aa59f3b907e319a8b26 (diff)
parentf8394f232b1eab649ce2df5c5f15b0e528c92091 (diff)
Merge 5.10-rc3 into tty-next
We need the TTY/vt/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r--drivers/tty/tty_io.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index f50286fb080d..c8cbb6bf3932 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1517,10 +1517,12 @@ static void release_tty(struct tty_struct *tty, int idx)
tty->ops->shutdown(tty);
tty_save_termios(tty);
tty_driver_remove_tty(tty->driver, tty);
- tty->port->itty = NULL;
+ if (tty->port)
+ tty->port->itty = NULL;
if (tty->link)
tty->link->port->itty = NULL;
- tty_buffer_cancel_work(tty->port);
+ if (tty->port)
+ tty_buffer_cancel_work(tty->port);
if (tty->link)
tty_buffer_cancel_work(tty->link->port);