Skip to content

Commit

Permalink
net/ipn3ke: remove useless if statement
Browse files Browse the repository at this point in the history
Coverity complains that this statement is not needed as the goto
label is on the next line anyway. Remove the if statement.

653        ret = ipn3ke_cfg_parse_i40e_pf_ethdev(afu_name, pf_name);
   CID 337930 (#1 of 1): Identical code for different branches
   (IDENTICAL_BRANCHES)identical_branches: The same code is executed
   when the condition ret is true or false, because the code in the
   if-then branch and after the if statement is identical. Should
   the if statement be removed?
654        if (ret)
655                goto end;
   implicit_else: The code from the above if-then branch is identical
   to the code after the if statement.
656end:

Coverity issue: 337930
Fixes: c01c748 ("net/ipn3ke: add new driver")
Cc: stable@dpdk.org

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
  • Loading branch information
kevintraynor authored and tmonjalo committed Nov 8, 2019
1 parent 841a0b7 commit d28ae28
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ipn3ke/ipn3ke_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,7 @@ ipn3ke_cfg_probe(struct rte_vdev_device *dev)
}

ret = ipn3ke_cfg_parse_i40e_pf_ethdev(afu_name, pf_name);
if (ret)
goto end;

end:
if (kvlist)
rte_kvargs_free(kvlist);
Expand Down

0 comments on commit d28ae28

Please sign in to comment.