提交 a99cc5d9 编写于 作者: P Peter Hurley 提交者: Greg Kroah-Hartman

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: NPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 c8b710b3
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册