From: Kamil Chalupnik Date: Wed, 16 May 2018 13:57:14 +0000 (+0200) Subject: app/bbdev: fix unchecked return value X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b1bc4217fd880cd89a6dae78b8aeb90d130854d9;p=dpdk.git 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 --- 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,