[PATCH 16/21] e1000: Remove unnecessary intialization

Andrey Smirnov andrew.smirnov at gmail.com
Tue May 31 10:09:35 PDT 2016


We always call e1000_init_eeprom_params() as a part of probing, so
there's no need check if it needs to be called in e1000_read_eeprom().

Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
 drivers/net/e1000/eeprom.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c
index a7059f6..0896fd6 100644
--- a/drivers/net/e1000/eeprom.c
+++ b/drivers/net/e1000/eeprom.c
@@ -563,10 +563,6 @@ int32_t e1000_read_eeprom(struct e1000_hw *hw, uint16_t offset,
 
 	DEBUGFUNC();
 
-	/* If eeprom is not yet detected, do so now */
-	if (eeprom->word_size == 0)
-		e1000_init_eeprom_params(hw);
-
 	/* A check for invalid values:  offset too large, too many words,
 	 * and not enough words.
 	 */
-- 
2.5.5




More information about the barebox mailing list