mxser: remove tty->driver_data NULL check

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 <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20211118073125.12283-8-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jiri Slaby 2021-11-18 08:31:13 +01:00 committed by Greg Kroah-Hartman
parent 5c338fbf21
commit 2fb19b9578

View File

@ -905,8 +905,6 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
struct mxser_port *info = tty->driver_data; struct mxser_port *info = tty->driver_data;
struct tty_port *port = &info->port; struct tty_port *port = &info->port;
if (info == NULL)
return;
if (tty_port_close_start(port, tty, filp) == 0) if (tty_port_close_start(port, tty, filp) == 0)
return; return;
mutex_lock(&port->mutex); mutex_lock(&port->mutex);