summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/e1000/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index caa7274a8d..d631e44b6e 100644
--- a/drivers/net/e1000/main.c
+++ b/drivers/net/e1000/main.c
@@ -840,10 +840,11 @@ static int e1000_setup_link(struct e1000_hw *hw)
* control setting, then the variable hw->fc will
* be initialized based on a value in the EEPROM.
*/
- if (e1000_read_eeprom(hw, EEPROM_INIT_CONTROL2_REG, 1,
- &eeprom_data) < 0) {
+ ret_val = e1000_read_eeprom(hw, EEPROM_INIT_CONTROL2_REG, 1,
+ &eeprom_data);
+ if (ret_val < 0) {
dev_dbg(hw->dev, "EEPROM Read Error\n");
- return -E1000_ERR_EEPROM;
+ return ret_val;
}
switch (hw->mac_type) {