summaryrefslogtreecommitdiff
path: root/drivers/tty/pty.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-07-07 08:58:23 +0200
committerIngo Molnar <mingo@kernel.org>2016-07-07 08:58:23 +0200
commit3ebe3bd8fbd51b5e04e93c7f3fb90bd096a86344 (patch)
tree41b67e7a92f1935b1d5acdc714de1b13f657b7af /drivers/tty/pty.c
parentc50f62454f4b489422333cb2e31401d87456bfa1 (diff)
parent2c81a6477081966fe80b8c6daa68459bca896774 (diff)
downloadlinux-next-3ebe3bd8fbd51b5e04e93c7f3fb90bd096a86344.tar.gz
Merge branch 'perf/urgent' into perf/core, to pick up fixes before merging new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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)
fsi = tty->driver_data;
else
fsi = tty->link->driver_data;
- devpts_kill_index(fsi, tty->index);
- devpts_release(fsi);
+
+ if (fsi) {
+ devpts_kill_index(fsi, tty->index);
+ devpts_release(fsi);
+ }
}
static const struct tty_operations ptm_unix98_ops = {