mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-24 02:18:54 +00:00
xhci: don't dereference a xhci member after removing xhci
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 CC: <stable@vger.kernel.org> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
88716a9376
commit
f1f6d9a8b5
@ -314,11 +314,12 @@ static void xhci_pci_remove(struct pci_dev *dev)
|
||||
usb_remove_hcd(xhci->shared_hcd);
|
||||
usb_put_hcd(xhci->shared_hcd);
|
||||
}
|
||||
usb_hcd_pci_remove(dev);
|
||||
|
||||
/* Workaround for spurious wakeups at shutdown with HSW */
|
||||
if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
|
||||
pci_set_power_state(dev, PCI_D3hot);
|
||||
|
||||
usb_hcd_pci_remove(dev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
Loading…
Reference in New Issue
Block a user