Message ID | 20230509170935.2237051-4-anthony.l.nguyen@intel.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Intel Wired LAN Driver Updates 2023-05-09 (igc, igb) | expand |
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index 7d60da1b7bf4..99b6b21caa02 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c @@ -822,6 +822,8 @@ static int igb_set_eeprom(struct net_device *netdev, */ ret_val = hw->nvm.ops.read(hw, last_word, 1, &eeprom_buff[last_word - first_word]); + if (ret_val) + goto out; } /* Device's eeprom is always little-endian, word addressable */ @@ -839,7 +841,7 @@ static int igb_set_eeprom(struct net_device *netdev, /* Update the checksum if nvm write succeeded */ if (ret_val == 0) hw->nvm.ops.update(hw); - +out: igb_set_fw_version(adapter); kfree(eeprom_buff); return ret_val;