From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D346CA00E6 for ; Tue, 6 Aug 2019 23:13:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C81471B950; Tue, 6 Aug 2019 23:12:56 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 685881B197 for ; Tue, 6 Aug 2019 23:12:52 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Aug 2019 14:12:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,353,1559545200"; d="scan'208";a="325757967" Received: from skx-5gnr-sc12-4.sc.intel.com ([172.25.69.210]) by orsmga004.jf.intel.com with ESMTP; 06 Aug 2019 14:12:50 -0700 From: Nicolas Chautru To: dev@dpdk.org, akhil.goyal@nxp.com Cc: ferruh.yigit@intel.com, thomas@monjalon.net, john.mcnamara@intel.com, Nicolas Chautru Date: Tue, 6 Aug 2019 07:09:00 -0700 Message-Id: <1565100540-60599-3-git-send-email-nicolas.chautru@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1565100540-60599-1-git-send-email-nicolas.chautru@intel.com> References: <1565100540-60599-1-git-send-email-nicolas.chautru@intel.com> Subject: [dpdk-dev] [PATCH v2 2/2] app/bbdev: fix unchecked return valued 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 a166eaf..7ab61ef 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -3163,7 +3163,8 @@ typedef int (test_case_function)(struct active_device *ad, 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 @@ typedef int (test_case_function)(struct active_device *ad, 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, -- 1.8.3.1