diff options
author | Greg Kroah-Hartman | 2017-10-16 10:33:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2017-10-16 10:33:54 +0200 |
commit | e4ed2b5370a2df2b1feeb970904d2f7761c241c9 (patch) | |
tree | 852b17dcc8ed1ca8f35771e8f06d660bdfc51804 /drivers/usb/serial/console.c | |
parent | Merge 4.14-rc4 into usb-next (diff) | |
parent | Linux 4.14-rc5 (diff) | |
download | kernel-qcow2-linux-e4ed2b5370a2df2b1feeb970904d2f7761c241c9.tar.gz kernel-qcow2-linux-e4ed2b5370a2df2b1feeb970904d2f7761c241c9.tar.xz kernel-qcow2-linux-e4ed2b5370a2df2b1feeb970904d2f7761c241c9.zip |
Merge 4.14-rc5 into usb-next
We want the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/console.c')
-rw-r--r-- | drivers/usb/serial/console.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index fdf89800ebc3..43a862a90a77 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c @@ -186,6 +186,7 @@ static int usb_console_setup(struct console *co, char *options) tty_kref_put(tty); reset_open_count: port->port.count = 0; + info->port = NULL; usb_autopm_put_interface(serial->interface); error_get_interface: usb_serial_put(serial); @@ -265,7 +266,7 @@ static struct console usbcons = { void usb_serial_console_disconnect(struct usb_serial *serial) { - if (serial->port[0] == usbcons_info.port) { + if (serial->port[0] && serial->port[0] == usbcons_info.port) { usb_serial_console_exit(); usb_serial_put(serial); } |