mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 10:29:37 +00:00
usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix()
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 commit 52fb61250a
"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>
Cc: stable@vger.kernel.org
This commit is contained in:
parent
599459d823
commit
9005355af2
1 changed files with 3 additions and 0 deletions
|
@ -325,6 +325,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) {
|
||||
|
|
Loading…
Reference in a new issue