PCI/MSI: Check that we have a legacy interrupt line before using it
authorChristoph Hellwig <hch@lst.de>
Wed, 1 Feb 2017 13:41:42 +0000 (14:41 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 10 Feb 2017 22:05:06 +0000 (16:05 -0600)
commit862290f9e23c39051e59bf12ce65707a8ec8b911
tree992c822cae2bf5a70159fdf044732c4e6baf3b0b
parent699c4cec238731a4c466f73fe6e9e45ab6f49a41
PCI/MSI: Check that we have a legacy interrupt line before using it

It seems like there are some devices (e.g. the PCIe root port driver) that
may not always have a INTx interrupt.  Check for dev->irq before returning
a legacy interrupt in pci_irq_alloc_vectors to properly handle this case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/msi.c