[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <47139367.9090400@intel.com>
Date: Mon, 15 Oct 2007 09:20:55 -0700
From: "Kok, Auke" <auke-jan.h.kok@...el.com>
To: Adrian Bunk <bunk@...nel.org>
CC: Auke Kok <auke-jan.h.kok@...el.com>, Jeff Garzik <jeff@...zik.org>,
e1000-devel@...ts.sourceforge.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [2.6 patch] e1000e/ethtool.c: fix error checks
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@...nel.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
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists