Skip to content

Commit

Permalink
e1000e: cleanup: remove unnecessary variable ret_val
Browse files Browse the repository at this point in the history
ret_val gets initialized to -E1000_ERR_NVM and never set differently, so
get rid of it and just return -E1000_ERR_NVM.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Bruce Allan authored and Jeff Kirsher committed Feb 13, 2012
1 parent f1a3fe1 commit 55920b5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/intel/e1000e/ich8lan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2308,7 +2308,6 @@ static s32 e1000_flash_cycle_ich8lan(struct e1000_hw *hw, u32 timeout)
{
union ich8_hws_flash_ctrl hsflctl;
union ich8_hws_flash_status hsfsts;
s32 ret_val = -E1000_ERR_NVM;
u32 i = 0;

/* Start a cycle by writing 1 in Flash Cycle Go in Hw Flash Control */
Expand All @@ -2327,7 +2326,7 @@ static s32 e1000_flash_cycle_ich8lan(struct e1000_hw *hw, u32 timeout)
if (hsfsts.hsf_status.flcdone == 1 && hsfsts.hsf_status.flcerr == 0)
return 0;

return ret_val;
return -E1000_ERR_NVM;
}

/**
Expand Down

0 comments on commit 55920b5

Please sign in to comment.