net/ipn3ke: delete unnecessary code

Message ID 1558507524-350810-1-git-send-email-andy.pei@intel.com (mailing list archive)
State Changes Requested, archived
Delegated to: Qi Zhang
Headers
Series net/ipn3ke: delete unnecessary code |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Pei, Andy May 22, 2019, 6:45 a.m. UTC
  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

Xu, Rosen May 23, 2019, 2:28 a.m. UTC | #1
> -----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>
  

Patch

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);