tty: Remove !tty check from free_tty_struct()
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 10 Jan 2016 05:13:47 +0000 (21:13 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jan 2016 22:28:20 +0000 (14:28 -0800)
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 <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_io.c

index c9f2365167df459e4450471fb5874dfd24a6f06e..a59930e59660c662f42eeb05a2ae7dd25848d149 100644 (file)
@@ -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);