mctp: serial: remove unnecessary ldisc data check
authorJeremy Kerr <jk@codeconstruct.com.au>
Thu, 25 Nov 2021 06:07:39 +0000 (14:07 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 26 Nov 2021 03:40:39 +0000 (19:40 -0800)
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>
drivers/net/mctp/mctp-serial.c

index b0e14a63b10d4038933993b4d8c9c651848732e6..eaa6fb3224bc4809b5f4a883120f404968246096 100644 (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;