From: Dima Ruinskiy <[email protected]>

During HV PHY workaround handling, a failure writing to the PHY control
register was silently discarded rather than returned to the caller. Add
the missing early return so the error is correctly propagated.

Fixes: 5a32a257f957 ("e1000: more NICs in base driver")
Cc: [email protected]

Signed-off-by: Dima Ruinskiy <[email protected]>
Signed-off-by: Ciara Loftus <[email protected]>
---
 drivers/net/intel/e1000/base/e1000_ich8lan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/intel/e1000/base/e1000_ich8lan.c 
b/drivers/net/intel/e1000/base/e1000_ich8lan.c
index e62847fb4e..0290a7dcb4 100644
--- a/drivers/net/intel/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/intel/e1000/base/e1000_ich8lan.c
@@ -2696,6 +2696,8 @@ STATIC s32 e1000_hv_phy_workarounds_ich8lan(struct 
e1000_hw *hw)
                        e1000_phy_sw_reset_generic(hw);
                        ret_val = hw->phy.ops.write_reg(hw, PHY_CONTROL,
                                                        0x3140);
+                       if (ret_val)
+                               return ret_val;
                }
        }
 
-- 
2.43.0

Reply via email to