Message ID | 4A0D1E3A.9040305@jp.fujitsu.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 6f2e629..247464d 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -445,8 +445,12 @@ static int msix_capability_init(struct pci_dev *dev, /* MSI-X Table Initialization */ for (i = 0; i < nvec; i++) { entry = alloc_msi_entry(dev); - if (!entry) - break; + if (!entry) { + if (!i) + return -ENOMEM; + msi_free_irqs(dev); + return i; + } j = entries[i].entry; entry->msi_attrib.is_msix = 1;