All of lore.kernel.org
 help / color / mirror / Atom feed
From: Auke Kok <auke-jan.h.kok@intel.com>
To: jeff@garzik.ok
Cc: netdev@vger.kernel.org, bunk@kernel.org, joe@perches.com,
	auke-jan.h.kok@intel.com
Subject: [PATCH 2/2] e1000e: fix error checks
Date: Mon, 15 Oct 2007 14:02:21 -0700	[thread overview]
Message-ID: <20071015210221.26666.14629.stgit@localhost.localdomain> (raw)
In-Reply-To: <20071015210213.26666.90484.stgit@localhost.localdomain>

From: Adrian Bunk <bunk@kernel.org>

Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---

 drivers/net/e1000e/ethtool.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index b7a7e2a..ca06c35 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -1451,11 +1451,11 @@ static int e1000_loopback_test(struct e1000_adapter *adapter, u64 *data)
 	}
 
 	*data = e1000_setup_desc_rings(adapter);
-	if (data)
+	if (*data)
 		goto out;
 
 	*data = e1000_setup_loopback_test(adapter);
-	if (data)
+	if (*data)
 		goto err_loopback;
 
 	*data = e1000_run_loopback_test(adapter);

  reply	other threads:[~2007-10-15 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-15 21:02 [PATCH 1/2] e1000e: Fix debug printk macro Auke Kok
2007-10-15 21:02 ` Auke Kok [this message]
2007-10-17  1:15   ` [PATCH 2/2] e1000e: fix error checks Jeff Garzik

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=20071015210221.26666.14629.stgit@localhost.localdomain \
    --to=auke-jan.h.kok@intel.com \
    --cc=bunk@kernel.org \
    --cc=jeff@garzik.ok \
    --cc=joe@perches.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.