summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-dbgtty.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-30 05:12:05 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-30 05:12:05 -0700
commit03420865e10d05d60d592fe8649e4853dc69ca5a (patch)
tree105d173e5267931d794e429ee7c64f83e526a521 /drivers/usb/host/xhci-dbgtty.c
parenta2e63709b53312002009c564460af34520c62f98 (diff)
parent6da6c0db5316275015e8cc2959f12a17584aeb64 (diff)
downloadblackbird-op-linux-03420865e10d05d60d592fe8649e4853dc69ca5a.tar.gz
blackbird-op-linux-03420865e10d05d60d592fe8649e4853dc69ca5a.zip
Merge 4.17-rc3 into staging-next
We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-dbgtty.c')
-rw-r--r--drivers/usb/host/xhci-dbgtty.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci-dbgtty.c b/drivers/usb/host/xhci-dbgtty.c
index 48779c44c361..eb494ec547e8 100644
--- a/drivers/usb/host/xhci-dbgtty.c
+++ b/drivers/usb/host/xhci-dbgtty.c
@@ -320,9 +320,11 @@ int xhci_dbc_tty_register_driver(struct xhci_hcd *xhci)
void xhci_dbc_tty_unregister_driver(void)
{
- tty_unregister_driver(dbc_tty_driver);
- put_tty_driver(dbc_tty_driver);
- dbc_tty_driver = NULL;
+ if (dbc_tty_driver) {
+ tty_unregister_driver(dbc_tty_driver);
+ put_tty_driver(dbc_tty_driver);
+ dbc_tty_driver = NULL;
+ }
}
static void dbc_rx_push(unsigned long _port)
OpenPOWER on IntegriCloud