summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-12-12 20:25:04 +0300
committerBjorn Helgaas <bhelgaas@google.com>2016-12-12 20:25:04 +0300
commitdb5ba864126476fcaa3778b40d12f25168af206b (patch)
treed90e40908cb8e8a8aa4b5dd046d3ff32e0088cc3 /drivers/pci
parentc1f2e80c1973ffdc1e772fcab32fb30fb2a8def8 (diff)
parentd1d111e073840b8dbc1ae90ba3fc274736451bdc (diff)
downloadlinux-db5ba864126476fcaa3778b40d12f25168af206b.tar.xz
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.c3
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];