Thread (21 messages) read the whole thread 21 messages, 2 authors, 2021-11-18
STALE1716d LANDED

Landed in mainline as 2fb19b957805 on 2021-11-25.

[PATCH 07/19] mxser: remove tty->driver_data NULL check

From: Jiri Slaby <hidden>
Date: 2021-11-18 07:32:00
Also in: lkml
Subsystem: moxa smartio/industio/intellio serial card, the rest, tty layer and serial drivers · Maintainers: Jiri Slaby, Linus Torvalds, Greg Kroah-Hartman

Noone sets tty->driver_data to NULL in the driver, so there is no point
to check that in mxser_close(). Remove the check.

Signed-off-by: Jiri Slaby <redacted>
---
 drivers/tty/mxser.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 6e5e1c74bf3e..6b47a0607f59 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -905,8 +905,6 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
 	struct mxser_port *info = tty->driver_data;
 	struct tty_port *port = &info->port;
 
-	if (info == NULL)
-		return;
 	if (tty_port_close_start(port, tty, filp) == 0)
 		return;
 	mutex_lock(&port->mutex);
-- 
2.33.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help