[dpdk-stable] [PATCH v2] net/i40e: add return check coverity
Xing, Beilei
beilei.xing at intel.com
Fri Jul 19 02:53:50 CEST 2019
> -----Original Message-----
> From: Lipiec, Herakliusz
> Sent: Thursday, July 18, 2019 10:45 PM
> To: Xing, Beilei <beilei.xing at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>
> Cc: dev at dpdk.org; Lipiec, Herakliusz <herakliusz.lipiec at intel.com>;
> stable at dpdk.org
> Subject: [PATCH v2] net/i40e: add return check coverity
>
> add return check for i40e_vsi_delete_mac call in
> rte_pmd_i40e_remove_vf_mac_addr as per coverity issue.
>
> v2:
> add a fixline to commit message
>
> Coverity Issue: 277224
> Cc: stable at dpdk.org
> Fixes: e0cb96204b71 ("net/i40e: add support for representor ports")
> Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec at intel.com>
> ---
> drivers/net/i40e/rte_pmd_i40e.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/i40e/rte_pmd_i40e.c
> b/drivers/net/i40e/rte_pmd_i40e.c index 24281c293..4c3c7088a 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;
> }
>
> --
> 2.17.2
Acked-by: Beilei Xing <beilei.xing at intel.com>
More information about the stable
mailing list