netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Assmann <sassmann@redhat.com>
To: netdev <netdev@vger.kernel.org>
Cc: Andy Gospodarek <gospo@redhat.com>,
	alexander.h.duyck@intel.com, davem@davemloft.net
Subject: [PATCH] igb: fix misinterpreted return value of pci_enable_msix
Date: Tue, 24 Nov 2009 11:31:26 +0100	[thread overview]
Message-ID: <4B0BB5FE.2000907@redhat.com> (raw)

From: Stefan Assmann <sassmann@redhat.com>

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 <sassmann@redhat.com>
---
 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


             reply	other threads:[~2009-11-24 10:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-24 10:31 Stefan Assmann [this message]
2009-11-24 10:40 ` [PATCH] igb: fix misinterpreted return value of pci_enable_msix Florian Westphal
2009-11-24 10:51   ` Stefan Assmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B0BB5FE.2000907@redhat.com \
    --to=sassmann@redhat.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).