numam-dpdk/drivers/net/ipn3ke
Kevin Traynor 841a0b7aed net/ipn3ke: fix TM commit check
Coverity is complaining about identical code regardless of which branch
of the if else is taken. Functionally it means an error will always be
returned if this if else is hit. Remove the else branch.

    CID 337928 (#1 of 1): Identical code for different branches
    (IDENTICAL_BRANCHES)identical_branches: The same code is executed
    regardless of whether n->level != IPN3KE_TM_NODE_LEVEL_COS ||
    n->n_children != 0U is true, because the 'then' and 'else' branches
    are identical. Should one of the branches be modified, or the entire
    'if' statement replaced?
1506  if (n->level != IPN3KE_TM_NODE_LEVEL_COS ||
1507          n->n_children != 0) {
1508          return -rte_tm_error_set(error,
1509                  EINVAL,
1510                  RTE_TM_ERROR_TYPE_UNSPECIFIED,
1511                  NULL,
1512                  rte_strerror(EINVAL));
    else_branch: The else branch, identical to the then branch.
1513  } else {
1514          return -rte_tm_error_set(error,
1515                  EINVAL,
1516                  RTE_TM_ERROR_TYPE_UNSPECIFIED,
1517                  NULL,
1518                  rte_strerror(EINVAL));
1519  }

Coverity issue: 337928
Fixes: c820468ac9 ("net/ipn3ke: support TM")
Cc: stable@dpdk.org

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
2019-11-08 16:40:28 +01:00
..
ipn3ke_ethdev.c net/ipn3ke: setup MTU during HW init 2019-10-07 15:00:56 +02:00
ipn3ke_ethdev.h net/ipn3ke: setup MTU during HW init 2019-10-07 15:00:56 +02:00
ipn3ke_flow.c remove extra blank lines at end of files 2019-08-05 15:19:32 +02:00
ipn3ke_flow.h net/ipn3ke: support flow API 2019-04-19 14:51:54 +02:00
ipn3ke_logs.h net/ipn3ke: add new driver 2019-04-19 14:51:54 +02:00
ipn3ke_rawdev_api.h net/ipn3ke: add new driver 2019-04-19 14:51:54 +02:00
ipn3ke_representor.c ethdev: change allmulticast callbacks to return status 2019-10-07 15:00:55 +02:00
ipn3ke_tm.c net/ipn3ke: fix TM commit check 2019-11-08 16:40:28 +01:00
Makefile net/ipn3ke: support flow API 2019-04-19 14:51:54 +02:00
meson.build net/ipn3ke: support flow API 2019-04-19 14:51:54 +02:00
rte_pmd_ipn3ke_version.map net/ipn3ke: add new driver 2019-04-19 14:51:54 +02:00