Skip to content

Commit

Permalink
tty: pty, remove BUG_ON from pty_close
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Jan 7, 2021
1 parent e81de38 commit 9bc1b2b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/tty/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ static DEFINE_MUTEX(devpts_mutex);

static void pty_close(struct tty_struct *tty, struct file *filp)
{
BUG_ON(!tty);
if (tty->driver->subtype == PTY_TYPE_MASTER)
WARN_ON(tty->count > 1);
else {
Expand Down

0 comments on commit 9bc1b2b

Please sign in to comment.