]> 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 12:31:28 +0000 (13:31 +0100)
commit234d51b8f52c94568fde657f1a24f2f69db07420
tree43634f5877d4d6c01a8fe05ee312a54339c4f918
parent83d29ea1fb6d53a3c4d3377cc30093a31acecc38
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