Browse Source

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 <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Hurley 9 years ago
parent
commit
a99cc5d995
1 changed files with 0 additions and 2 deletions
  1. 0 2
      drivers/tty/tty_io.c

+ 0 - 2
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)
 void free_tty_struct(struct tty_struct *tty)
 {
 {
-	if (!tty)
-		return;
 	tty_ldisc_deinit(tty);
 	tty_ldisc_deinit(tty);
 	put_device(tty->dev);
 	put_device(tty->dev);
 	kfree(tty->write_buf);
 	kfree(tty->write_buf);