Code clean up due to if-check not required Signed-off-by: Nicolas Chautru <nicolas.chau...@intel.com> --- lib/bbdev/rte_bbdev_op.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/lib/bbdev/rte_bbdev_op.h b/lib/bbdev/rte_bbdev_op.h index afa1a71..386eed8 100644 --- a/lib/bbdev/rte_bbdev_op.h +++ b/lib/bbdev/rte_bbdev_op.h @@ -970,10 +970,8 @@ struct rte_mempool * /* Get elements */ ret = rte_mempool_get_bulk(mempool, (void **)ops, num_ops); - if (unlikely(ret < 0)) - return ret; - return 0; + return ret; } /** @@ -1006,10 +1004,8 @@ struct rte_mempool * /* Get elements */ ret = rte_mempool_get_bulk(mempool, (void **)ops, num_ops); - if (unlikely(ret < 0)) - return ret; - return 0; + return ret; } /** @@ -1035,17 +1031,14 @@ struct rte_mempool * int ret; /* Check type */ - priv = (struct rte_bbdev_op_pool_private *) - rte_mempool_get_priv(mempool); + priv = (struct rte_bbdev_op_pool_private *) rte_mempool_get_priv(mempool); if (unlikely(priv->type != RTE_BBDEV_OP_FFT)) return -EINVAL; /* Get elements */ ret = rte_mempool_get_bulk(mempool, (void **)ops, num_ops); - if (unlikely(ret < 0)) - return ret; - return 0; + return ret; } /** -- 1.8.3.1