xhci: don't dereference a xhci member after removing xhci
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 16 Aug 2016 07:18:06 +0000 (10:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Sep 2016 06:32:40 +0000 (08:32 +0200)
commitc5a6d60b93315ecf7d2d446045a7295f0825e6fc
tree01aada8522260e55a5b5308502327339b03fdda3
parent262d059872a93c1bdaa3371602c921f1ce758f1d
xhci: don't dereference a xhci member after removing xhci

commit f1f6d9a8b540df22b87a5bf6bc104edaade81f47 upstream.

Remove the hcd after checking for the xhci last quirks, not before.

This caused a hang on a Alpine Ridge xhci based maching which remove
the whole xhci controller when unplugging the last usb device

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-pci.c