Merge branch 'pci/msi' into next

* pci/msi:
  PCI/MSI: Check for NULL affinity mask in pci_irq_get_affinity()
This commit is contained in:
Bjorn Helgaas 2016-12-12 11:25:04 -06:00
commit db5ba86412

View File

@ -1292,7 +1292,8 @@ const struct cpumask *pci_irq_get_affinity(struct pci_dev *dev, int nr)
} else if (dev->msi_enabled) { } else if (dev->msi_enabled) {
struct msi_desc *entry = first_pci_msi_entry(dev); 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 NULL;
return &entry->affinity[nr]; return &entry->affinity[nr];