From d3345d4070e577bb369f38c53d00db7d1968b5c9 Mon Sep 17 00:00:00 2001 From: Amr Mokhtar Date: Wed, 31 Jan 2018 13:54:28 +0000 Subject: [PATCH] app/bbdev: fix unchecked return value add check for rte_bbdev_callback_register() retun Coverity issue: 257027 Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev") Signed-off-by: Amr Mokhtar --- app/test-bbdev/test_bbdev_perf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 8f6896cc51..00f3b085f7 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -1557,9 +1557,11 @@ throughput_test(struct active_device *ad, throughput_function = throughput_intr_lcore_enc; /* Dequeue interrupt callback registration */ - rte_bbdev_callback_register(ad->dev_id, RTE_BBDEV_EVENT_DEQUEUE, - dequeue_event_callback, + ret = rte_bbdev_callback_register(ad->dev_id, + RTE_BBDEV_EVENT_DEQUEUE, dequeue_event_callback, &t_params); + if (ret < 0) + return ret; } else { if (test_vector.op_type == RTE_BBDEV_OP_TURBO_DEC) throughput_function = throughput_pmd_lcore_dec; -- 2.20.1