]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: mxuport: fix null deref when used as a console
authorJohan Hovold <johan@kernel.org>
Wed, 18 Feb 2015 04:51:07 +0000 (11:51 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 13:11:00 +0000 (14:11 +0100)
commit4e1f2e34fdfc8df71c58ef2552cecb5df848979a
tree3f33550714daa8cc6df327d6a120f5b75e5c4675
parent63834eef1577cef63aee30b17bff109ddb558a3d
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: ee467a1f2066 ("USB: serial: add Moxa UPORT 12XX/14XX/16XX
driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/mxuport.c