Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

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: ee467a1f2066 ("USB: serial: add Moxa UPORT 12XX/14XX/16XX
driver")
Cc: stable <stable@vger.kernel.org> # v3.14
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Greg Kroah-Hartman <greg@kroah.com>

+2 -1
+2 -1
drivers/usb/serial/mxuport.c
··· 1284 1284 } 1285 1285 1286 1286 /* Initial port termios */ 1287 - mxuport_set_termios(tty, port, NULL); 1287 + if (tty) 1288 + mxuport_set_termios(tty, port, NULL); 1288 1289 1289 1290 /* 1290 1291 * TODO: use RQ_VENDOR_GET_MSR, once we know what it