Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a99cc5d9 authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman
Browse files

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: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c8b710b3
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);