diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-10-20 11:02:05 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-10-20 11:02:05 +0200 |
commit | ca4b9c3b743da39a6e0756a5c68edb35f6fc5e53 (patch) | |
tree | 95ce0819f92e25bc4d768ab13cee1f385a83a7b2 /drivers/usb/serial/console.c | |
parent | a30b85df7d599f626973e9cd3056fe755bd778e0 (diff) | |
parent | 275d34b82561e695339b782950d49c386169dae3 (diff) | |
download | linux-ca4b9c3b743da39a6e0756a5c68edb35f6fc5e53.tar.bz2 |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.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); } |