diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-30 05:05:54 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-30 05:05:54 -0700 |
| commit | 720d690e3680d8ae5fcf86f8614c1a10b4ee7605 (patch) | |
| tree | 02158973d51022d7374f5b6e2f1953b530127f43 /drivers/usb/host/xhci-dbgtty.c | |
| parent | 72b6500c1cc68b949faa1bac76359dc601b482d6 (diff) | |
| parent | 6da6c0db5316275015e8cc2959f12a17584aeb64 (diff) | |
| download | blackbird-obmc-linux-720d690e3680d8ae5fcf86f8614c1a10b4ee7605.tar.gz blackbird-obmc-linux-720d690e3680d8ae5fcf86f8614c1a10b4ee7605.zip | |
Merge 4.17-rc3 into char-misc-next
We want the 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.c | 8 |
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) |

