usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix()
authorJack Pham <jackp@codeaurora.org>
Fri, 15 Nov 2013 22:53:14 +0000 (14:53 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Feb 2014 19:08:13 +0000 (11:08 -0800)
commit01aca4a70e1d97fac18a563f30d50f4c2e8d3864
treef3a2ba49e1ee5a4c29a36b8afec88694dff18fd5
parent915ad6ec8715b4799b0b0d3529db348a66fe3c9e
usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix()

commit 9005355af23856c55a5538c9024355785424821b upstream.

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 52fb61250a7a132b0cfb9f4a1060a1f3c49e5a25
"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>
drivers/usb/host/xhci.c