Add return value check for i40e_vsi_delete_mac call in
rte_pmd_i40e_remove_vf_mac_addr as per coverity issue.
Coverity issue: 277224
Fixes:
e0cb96204b71 ("net/i40e: add support for representor ports")
Cc: stable@dpdk.org
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
struct i40e_pf_vf *vf;
struct i40e_vsi *vsi;
struct i40e_pf *pf;
+ int ret;
if (i40e_validate_mac_addr((u8 *)mac_addr) != I40E_SUCCESS)
return -EINVAL;
rte_ether_addr_copy(&null_mac_addr, &vf->mac_addr);
/* Remove the mac */
- i40e_vsi_delete_mac(vsi, mac_addr);
-
+ ret = i40e_vsi_delete_mac(vsi, mac_addr);
+ if (ret != I40E_SUCCESS)
+ return ret;
return 0;
}