diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-12-12 11:25:04 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-12-12 11:25:04 -0600 |
commit | db5ba864126476fcaa3778b40d12f25168af206b (patch) | |
tree | d90e40908cb8e8a8aa4b5dd046d3ff32e0088cc3 /drivers/pci | |
parent | c1f2e80c1973ffdc1e772fcab32fb30fb2a8def8 (diff) | |
parent | d1d111e073840b8dbc1ae90ba3fc274736451bdc (diff) | |
download | blackbird-op-linux-db5ba864126476fcaa3778b40d12f25168af206b.tar.gz blackbird-op-linux-db5ba864126476fcaa3778b40d12f25168af206b.zip |
Merge branch 'pci/msi' into next
* pci/msi:
PCI/MSI: Check for NULL affinity mask in pci_irq_get_affinity()
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/msi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index bfdd0744b686..da4e3c1248db 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -1292,7 +1292,8 @@ const struct cpumask *pci_irq_get_affinity(struct pci_dev *dev, int nr) } else if (dev->msi_enabled) { struct msi_desc *entry = first_pci_msi_entry(dev); - if (WARN_ON_ONCE(!entry || nr >= entry->nvec_used)) + if (WARN_ON_ONCE(!entry || !entry->affinity || + nr >= entry->nvec_used)) return NULL; return &entry->affinity[nr]; |