From: Peter Hurley Date: Sun, 10 Jan 2016 05:13:47 +0000 (-0800) Subject: tty: Remove !tty check from free_tty_struct() X-Git-Tag: v4.6-rc1~118^2~220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a99cc5d9954651ac7402dcd40b133848303ba596;p=thirdparty%2Fkernel%2Flinux.git tty: Remove !tty check from free_tty_struct() free_tty_struct() is never called with NULL tty; the two call sites would already have faulted on earlier access. Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index c9f2365167df4..a59930e59660c 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -170,8 +170,6 @@ static void release_tty(struct tty_struct *tty, int idx); void free_tty_struct(struct tty_struct *tty) { - if (!tty) - return; tty_ldisc_deinit(tty); put_device(tty->dev); kfree(tty->write_buf);