Skip to content

Commit

Permalink
tty: Remove !tty check from free_tty_struct()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Hurley authored and Greg Kroah-Hartman committed Jan 27, 2016
1 parent c8b710b commit a99cc5d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/tty/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a99cc5d

Please sign in to comment.