netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: Adrian Bunk <bunk@kernel.org>
Cc: Auke Kok <auke-jan.h.kok@intel.com>,
	Jeff Garzik <jeff@garzik.org>,
	e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] e1000e/ethtool.c: fix error checks
Date: Mon, 15 Oct 2007 09:20:55 -0700	[thread overview]
Message-ID: <47139367.9090400@intel.com> (raw)
In-Reply-To: <20071014175104.GK4211@stusta.de>

Adrian Bunk wrote:
> You want to check for the value, not for the address.
> 
> Spotted by the Coverity checker.
> 
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
> 
> ---
> --- 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);

I'll forward this to Jeff,

thanks.

Auke

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-14 17:51 [2.6 patch] e1000e/ethtool.c: fix error checks Adrian Bunk
2007-10-15 16:20 ` Kok, Auke [this message]

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=47139367.9090400@intel.com \
    --to=auke-jan.h.kok@intel.com \
    --cc=bunk@kernel.org \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).