Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40570334 authored by Johan Hovold's avatar Johan Hovold Committed by Sasha Levin
Browse files

USB: mxuport: fix null deref when used as a console



commit db81de767e375743ebb0ad2bcad3326962c2b67e upstream.

Fix null-pointer dereference at probe when the device is used as a
console, in which case the tty argument to open will be NULL.

Fixes: ee467a1f ("USB: serial: add Moxa UPORT 12XX/14XX/16XX
driver")
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Acked-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent e7d3ac35
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1284,6 +1284,7 @@ static int mxuport_open(struct tty_struct *tty, struct usb_serial_port *port)
	}

	/* Initial port termios */
	if (tty)
		mxuport_set_termios(tty, port, NULL);

	/*