mctp: serial: remove unnecessary ldisc data check

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>
This commit is contained in:
Jeremy Kerr 2021-11-25 14:07:39 +08:00 committed by Jakub Kicinski
parent d154cd078a
commit d1c99f365a

View File

@ -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;