tty: pty, remove BUG_ON from pty_close

tty->ops->close is always called with a valid tty, so the BUG_ON cannot
trigger.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210105120239.28031-5-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jiri Slaby 2021-01-05 13:02:32 +01:00 committed by Greg Kroah-Hartman
parent e81de384af
commit 9bc1b2b9b8

View File

@ -45,7 +45,6 @@ static DEFINE_MUTEX(devpts_mutex);
static void pty_close(struct tty_struct *tty, struct file *filp) static void pty_close(struct tty_struct *tty, struct file *filp)
{ {
BUG_ON(!tty);
if (tty->driver->subtype == PTY_TYPE_MASTER) if (tty->driver->subtype == PTY_TYPE_MASTER)
WARN_ON(tty->count > 1); WARN_ON(tty->count > 1);
else { else {