Skip to content

Commit

Permalink
mctp: serial: remove unnecessary ldisc data check
Browse files Browse the repository at this point in the history
Jiri assures me that a ldisc->open with tty->disc_data set should never
happen, so this check doesn't do anything.

Reported-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jeremy Kerr authored and Jakub Kicinski committed Nov 26, 2021
1 parent d154cd0 commit d1c99f3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/mctp/mctp-serial.c
Original file line number Diff line number Diff line change
@@ -439,9 +439,6 @@ static int mctp_serial_open(struct tty_struct *tty)
if (!tty->ops->write)
return -EOPNOTSUPP;

if (tty->disc_data)
return -EEXIST;

idx = ida_alloc(&mctp_serial_ida, GFP_KERNEL);
if (idx < 0)
return idx;

0 comments on commit d1c99f3

Please sign in to comment.