From: Bruce Allan Date: Wed, 8 Feb 2012 02:55:25 +0000 (+0000) Subject: e1000e: cleanup: remove unnecessary variable ret_val X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~320 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fd258715bc03a13744ae7113297fed36a4645b30;p=users%2Fjedix%2Flinux-maple.git e1000e: cleanup: remove unnecessary variable ret_val ret_val gets initialized to -E1000_ERR_NVM and never set differently, so get rid of it and just return -E1000_ERR_NVM. (cherry picked from commit 55920b5eae24cfd2666f3f80bc5f2c0b3b18043b) Signed-off-by: Bruce Allan Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher Signed-off-by: Joe Jin --- diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 8bfb07528bd0..803569509c93 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c @@ -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 */ @@ -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; } /**