Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jiri Slaby and committed by
Greg Kroah-Hartman
9bc1b2b9 e81de384

-1
-1
drivers/tty/pty.c
··· 45 45 46 46 static void pty_close(struct tty_struct *tty, struct file *filp) 47 47 { 48 - BUG_ON(!tty); 49 48 if (tty->driver->subtype == PTY_TYPE_MASTER) 50 49 WARN_ON(tty->count > 1); 51 50 else {