DF-4418 / fix.diff
--- a/sys/dev/netif/ig_hal/e1000_82541.c +++ b/sys/dev/netif/ig_hal/e1000_82541.c @@ -1106,6 +1106,8 @@ * the end of this routine. */ ret_val = hw->phy.ops.read_reg(hw, 0x2F5B, &phy_saved_data); + if (ret_val) + goto out; /* Disabled the PHY transmitter */ hw->phy.ops.write_reg(hw, 0x2F5B, 0x0003); @@ -1156,12 +1158,18 @@ u16 fused, fine, coarse; /* Move to analog registers page */ - hw->phy.ops.read_reg(hw, IGP01E1000_ANALOG_SPARE_FUSE_STATUS, + ret_val = hw->phy.ops.read_reg(hw, + IGP01E1000_ANALOG_SPARE_FUSE_STATUS, &fused); + if (ret_val) + goto out; if (!(fused & IGP01E1000_ANALOG_SPARE_FUSE_ENABLED)) { - hw->phy.ops.read_reg(hw, IGP01E1000_ANALOG_FUSE_STATUS, + ret_val = hw->phy.ops.read_reg(hw, + IGP01E1000_ANALOG_FUSE_STATUS, &fused); + if (ret_val) + goto out; fine = fused & IGP01E1000_ANALOG_FUSE_FINE_MASK; coarse = fused & IGP01E1000_ANALOG_FUSE_COARSE_MASK; |