summaryrefslogtreecommitdiff
path: root/drivers/net/i40e/rte_pmd_i40e.c
diff options
context:
space:
mode:
authorHerakliusz Lipiec <herakliusz.lipiec@intel.com>2019-07-18 15:44:48 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-07-23 14:31:35 +0200
commit73bd0ad5936de7a3152850b22f0d08e5c7bd1f5a (patch)
treef97d7da89930b50a03d4d894e5c1f2bc4e68cee1 /drivers/net/i40e/rte_pmd_i40e.c
parent72d138ff0f58d2cf2c3ef58b0f5c32e186b82a15 (diff)
downloaddpdk-73bd0ad5936de7a3152850b22f0d08e5c7bd1f5a.zip
dpdk-73bd0ad5936de7a3152850b22f0d08e5c7bd1f5a.tar.gz
dpdk-73bd0ad5936de7a3152850b22f0d08e5c7bd1f5a.tar.xz
net/i40e: fix MAC removal check
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>
Diffstat (limited to 'drivers/net/i40e/rte_pmd_i40e.c')
-rw-r--r--drivers/net/i40e/rte_pmd_i40e.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 24281c2..4c3c708 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -581,6 +581,7 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
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;
@@ -609,8 +610,9 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
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;
}