diff options
| author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-02-26 17:51:56 -0500 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2007-02-27 04:38:33 -0500 |
| commit | f8dfdd5cab482a2ce4a8e2375e1512aa4829c653 (patch) | |
| tree | d2c409de5c9cf830aa22793f162beb5612371df2 | |
| parent | 36c843d5e347ec71ec579a477c941538a03b8cf3 (diff) | |
netxen: do_rom_fast_write error handling
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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
| -rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 2f324366784d..2f965701a95b 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
| @@ -499,7 +499,10 @@ static inline int do_rom_fast_write_words(struct netxen_adapter *adapter, | |||
| 499 | while(1) { | 499 | while(1) { |
| 500 | int data1; | 500 | int data1; |
| 501 | 501 | ||
| 502 | do_rom_fast_read(adapter, addridx, &data1); | 502 | ret = do_rom_fast_read(adapter, addridx, &data1); |
| 503 | if (ret < 0) | ||
| 504 | return ret; | ||
| 505 | |||
| 503 | if (data1 == data) | 506 | if (data1 == data) |
| 504 | break; | 507 | break; |
| 505 | 508 | ||
