[v5,7/7] bbdev: remove unnecessary if-check

Message ID 1657150110-69957-8-git-send-email-nicolas.chautru@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series bbdev changes for 22.11 |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build fail github build: failed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing warning Testing issues
ci/intel-Testing success Testing PASS

Commit Message

Chautru, Nicolas July 6, 2022, 11:28 p.m. UTC
  Code clean up due to if-check not required

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 lib/bbdev/rte_bbdev_op.h | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
  

Patch

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;
 }
 
 /**