[PATCH 2/4] net/e1000: Do not discard EEPROM error code in e1000_setup_link()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



E1000_read_eeprom() returns a number of different error codes, so
propagate them up the caller chain instead of reducing it to
E1000_READ_EEPROM.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 drivers/net/e1000/main.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index caa7274a8..d631e44b6 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) {
-- 
2.19.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux