app/bbdev: fix bulk allocation checks

Returned value from rte_bbdev_enc_op_alloc_bulk not checked consistently.

Coverity issue: 344986
Fixes: d819c08327f3 ("app/bbdev: update for 5GNR")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
This commit is contained in:
Nicolas Chautru 2019-08-06 07:09:00 -07:00 committed by Thomas Monjalon
parent 4e8cd9041e
commit be840d083f

View File

@ -3163,7 +3163,8 @@ offload_latency_test_enc(struct rte_mempool *mempool, struct test_buffers *bufs,
if (unlikely(num_to_process - dequeued < burst_sz))
burst_sz = num_to_process - dequeued;
rte_bbdev_enc_op_alloc_bulk(mempool, ops_enq, burst_sz);
ret = rte_bbdev_enc_op_alloc_bulk(mempool, ops_enq, burst_sz);
TEST_ASSERT_SUCCESS(ret, "rte_bbdev_op_alloc_bulk() failed");
if (test_vector.op_type != RTE_BBDEV_OP_NONE)
copy_reference_enc_op(ops_enq, burst_sz, dequeued,
bufs->inputs,
@ -3244,7 +3245,8 @@ offload_latency_test_ldpc_enc(struct rte_mempool *mempool,
if (unlikely(num_to_process - dequeued < burst_sz))
burst_sz = num_to_process - dequeued;
rte_bbdev_enc_op_alloc_bulk(mempool, ops_enq, burst_sz);
ret = rte_bbdev_enc_op_alloc_bulk(mempool, ops_enq, burst_sz);
TEST_ASSERT_SUCCESS(ret, "rte_bbdev_op_alloc_bulk() failed");
if (test_vector.op_type != RTE_BBDEV_OP_NONE)
copy_reference_ldpc_enc_op(ops_enq, burst_sz, dequeued,
bufs->inputs,