mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 02:02:28 +09:00
usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix()
commit9005355af2upstream. If CONFIG_PCI is enabled, make sure xhci_cleanup_msix() doesn't try to free a bogus PCI IRQ or dereference an invalid pci_dev when the xHCI device is actually a platform_device. This patch should be backported to kernels as old as 3.9, that contain the commit52fb61250a"xhci-plat: Don't enable legacy PCI interrupts." Signed-off-by: Jack Pham <jackp@codeaurora.org> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
915ad6ec87
commit
01aca4a70e
@@ -315,6 +315,9 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci)
|
||||
struct usb_hcd *hcd = xhci_to_hcd(xhci);
|
||||
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
|
||||
|
||||
if (xhci->quirks & XHCI_PLAT)
|
||||
return;
|
||||
|
||||
xhci_free_irq(xhci);
|
||||
|
||||
if (xhci->msix_entries) {
|
||||
|
||||
Reference in New Issue
Block a user