netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amit Kale <amitkale@netxen.com>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Jeff Garzik <jgarzik@pobox.com>, netdev@vger.kernel.org
Subject: Re: [PATCH] netxen: do_rom_fast_write error handling
Date: Tue, 27 Feb 2007 12:11:02 +0530	[thread overview]
Message-ID: <200702271211.02344.amitkale@netxen.com> (raw)
In-Reply-To: <20070226145156.5c0424a3@freekitty>

Ah.. missed that.
Thanks.
-Amit

On Tuesday 27 February 2007 04:21, Stephen Hemminger wrote:
> Compiler warning spots real error!
>
> The function do_rom_fast_read called in do_rom_fast_write can fail
> and leave data1 unset. This causes a compile warning.
> The correct thing is to propagate the error out.
>
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
>
> ---
>  drivers/net/netxen/netxen_nic_init.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> --- pktgen.orig/drivers/net/netxen/netxen_nic_init.c	2007-02-26
> 14:45:46.000000000 -0800 +++
> pktgen/drivers/net/netxen/netxen_nic_init.c	2007-02-26 14:46:37.000000000
> -0800 @@ -499,7 +499,10 @@
>  		while(1) {
>  			int data1;
>
> -			do_rom_fast_read(adapter, addridx, &data1);
> +			ret = do_rom_fast_read(adapter, addridx, &data1);
> +			if (ret < 0)
> +				return ret;
> +
>  			if (data1 == data)
>  				break;

  reply	other threads:[~2007-02-27  6:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-26 22:51 [PATCH] netxen: do_rom_fast_write error handling Stephen Hemminger
2007-02-27  6:41 ` Amit Kale [this message]
2007-02-27  9:39 ` 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=200702271211.02344.amitkale@netxen.com \
    --to=amitkale@netxen.com \
    --cc=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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).