[PATCH 14/20] e1000: Remove unnecessary intialization

Andrey Smirnov andrew.smirnov at gmail.com
Sun Jan 17 19:52:35 PST 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 4a1c7e6..1f26a87 100644
--- a/drivers/net/e1000/eeprom.c
+++ b/drivers/net/e1000/eeprom.c
@@ -564,10 +564,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.0



More information about the barebox mailing list