net/ipn3ke: delete unnecessary code
Checks
Commit Message
Whether the value of ret is true or false,
the end target is always run.
It is unnecessary to check the value of ret,
so just delete it.
Coverity issue: 337930
Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver")
Cc: rosen.xu@intel.com
Cc: stable@dpdk.org
Signed-off-by: Andy Pei <andy.pei@intel.com>
---
drivers/net/ipn3ke/ipn3ke_ethdev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
> -----Original Message-----
> From: Pei, Andy
> Sent: Wednesday, May 22, 2019 14:45
> To: dev@dpdk.org
> Cc: Pei, Andy <andy.pei@intel.com>; Xu, Rosen <rosen.xu@intel.com>;
> stable@dpdk.org
> Subject: [PATCH] net/ipn3ke: delete unnecessary code
>
> Whether the value of ret is true or false, the end target is always run.
> It is unnecessary to check the value of ret, so just delete it.
>
> Coverity issue: 337930
> Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver")
> Cc: rosen.xu@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> ---
> drivers/net/ipn3ke/ipn3ke_ethdev.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> index 9079b57..d88afa6 100644
> --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> @@ -581,8 +581,7 @@ static int ipn3ke_vswitch_remove(struct
> rte_afu_device *afu_dev)
> }
>
> ret = ipn3ke_cfg_parse_i40e_pf_ethdev(afu_name, pf_name);
> - if (ret)
> - goto end;
> +
> end:
> if (kvlist)
> rte_kvargs_free(kvlist);
> --
> 1.8.3.1
Acked-by: Rosen Xu <rosen.xu@intel.com>
@@ -581,8 +581,7 @@ static int ipn3ke_vswitch_remove(struct rte_afu_device *afu_dev)
}
ret = ipn3ke_cfg_parse_i40e_pf_ethdev(afu_name, pf_name);
- if (ret)
- goto end;
+
end:
if (kvlist)
rte_kvargs_free(kvlist);