hw->mac.ops.set_rar(hw, vf_info[vf].mac_count,
new_mac, vf, IXGBE_RAH_AV);
} else {
- hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
- vf_info[vf].mac_count = 0;
+ if (vf_info[vf].mac_count) {
+ hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
+ vf_info[vf].mac_count = 0;
+ }
}
return 0;
}