aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/pty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/pty.c')
-rw-r--r--drivers/tty/pty.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index f856c4544eea..51e0d32883ba 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -667,8 +667,11 @@ static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty)
667 fsi = tty->driver_data; 667 fsi = tty->driver_data;
668 else 668 else
669 fsi = tty->link->driver_data; 669 fsi = tty->link->driver_data;
670 devpts_kill_index(fsi, tty->index); 670
671 devpts_release(fsi); 671 if (fsi) {
672 devpts_kill_index(fsi, tty->index);
673 devpts_release(fsi);
674 }
672} 675}
673 676
674static const struct tty_operations ptm_unix98_ops = { 677static const struct tty_operations ptm_unix98_ops = {