From b1bc4217fd880cd89a6dae78b8aeb90d130854d9 Mon Sep 17 00:00:00 2001 From: Kamil Chalupnik Date: Wed, 16 May 2018 15:57:14 +0200 Subject: [PATCH] app/bbdev: fix unchecked return value Fixing CHECKED_RETURN issue by checking values returned by rte_bbdev_dec_op_alloc_bulk and rte_bbdev_enc_op_alloc_bulk functions. Coverity issue: 279447, 279456 Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev") Cc: stable@dpdk.org Signed-off-by: Kamil Chalupnik Acked-by: Amr Mokhtar --- app/test-bbdev/test_bbdev_perf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index ca162d9af5..6861edc47c 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -1731,7 +1731,9 @@ latency_test_dec(struct rte_mempool *mempool, if (unlikely(num_to_process - dequeued < burst_sz)) burst_sz = num_to_process - dequeued; - rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz); + ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz); + TEST_ASSERT_SUCCESS(ret, + "rte_bbdev_dec_op_alloc_bulk() failed"); if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_dec_op(ops_enq, burst_sz, dequeued, bufs->inputs, @@ -1798,7 +1800,9 @@ latency_test_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_enc_op_alloc_bulk() failed"); if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_enc_op(ops_enq, burst_sz, dequeued, bufs->inputs, -- 2.20.1