Patchwork [3/9] PCI/MSI/x86: Make return values only 0/-errno when MSIs allocated

login
register
mail settings
Submitter Alexander Gordeev
Date Sept. 9, 2013, 3:24 p.m.
Message ID <20130909152404.GD24962@dhcp-26-207.brq.redhat.com>
Download mbox | patch
Permalink /patch/273589/
State Changes Requested
Headers show

Comments

Alexander Gordeev - Sept. 9, 2013, 3:24 p.m.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
 arch/x86/kernel/apic/io_apic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 9ed796c..4a95d9a 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3140,7 +3140,7 @@  int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
 
 	/* Multiple MSI vectors only supported with interrupt remapping */
 	if (type == PCI_CAP_ID_MSI && nvec > 1)
-		return 1;
+		return -EINVAL;
 
 	node = dev_to_node(&dev->dev);
 	irq_want = nr_irqs_gsi;