Subject: [PATCH] igb: fix misinterpreted return value of pci_enable_msix

From: Stefan Assmann <[email-masked]>
Date: Tue, 24 Nov 2009 11:31:26 +0100

From: Stefan Assmann <[email-masked]>

In the igb driver a return value of 0 of function pci_enable_msix is
interpreted as an error case. The correct behaviour is to check < 0 for error
values.

Signed-off-by: Stefan Assmann <[email-masked]>
---
 drivers/net/igb/igb_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index bb1a6ee..745481d 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -694,7 +694,7 @@ static void igb_set_interrupt_capability(struct igb_adapter *adapter)
 	err = pci_enable_msix(adapter->pdev,
 			      adapter->msix_entries,
 			      numvecs);
-	if (err == 0)
+	if (err < 0)
 		goto out;

 	igb_reset_interrupt_capability(adapter);
-- 
1.6.5.2