From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id BCFF41B74A for ; Wed, 31 Jan 2018 14:54:32 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2018 05:54:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,440,1511856000"; d="scan'208";a="200102971" Received: from silpixa00391537.ir.intel.com (HELO silpixa00391537.ger.corp.intel.com) ([10.237.222.189]) by fmsmga005.fm.intel.com with ESMTP; 31 Jan 2018 05:54:31 -0800 From: Amr Mokhtar To: dev@dpdk.org Cc: Amr Mokhtar Date: Wed, 31 Jan 2018 13:54:28 +0000 Message-Id: <1517406868-130533-1-git-send-email-amr.mokhtar@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] app/testbbdev: fix unchecked return value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2018 13:54:33 -0000 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 f7b51ca..21efad4 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.7.4