[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211123125042.2564114-4-jk@codeconstruct.com.au>
Date: Tue, 23 Nov 2021 20:50:42 +0800
From: Jeremy Kerr <jk@...econstruct.com.au>
To: netdev@...r.kernel.org
Cc: Jiri Slaby <jirislaby@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Matt Johnston <matt@...econstruct.com.au>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Subject: [PATCH net-next 3/3] 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@...nel.org>
Signed-off-by: Jeremy Kerr <jk@...econstruct.com.au>
---
drivers/net/mctp/mctp-serial.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/mctp/mctp-serial.c b/drivers/net/mctp/mctp-serial.c
index 5687ad3220cd..9919a4734ed9 100644
--- a/drivers/net/mctp/mctp-serial.c
+++ b/drivers/net/mctp/mctp-serial.c
@@ -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;
--
2.33.0
Powered by blists - more mailing lists