DPDK patches and discussions
 help / color / mirror / Atom feed
From: Amr Mokhtar <amr.mokhtar@intel.com>
To: dev@dpdk.org
Cc: Amr Mokhtar <amr.mokhtar@intel.com>
Subject: [dpdk-dev] [PATCH] app/testbbdev: fix unchecked return value
Date: Wed, 31 Jan 2018 13:54:28 +0000	[thread overview]
Message-ID: <1517406868-130533-1-git-send-email-amr.mokhtar@intel.com> (raw)

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 <amr.mokhtar@intel.com>
---
 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

             reply	other threads:[~2018-01-31 13:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 13:54 Amr Mokhtar [this message]
2018-01-31 15:25 ` Thomas Monjalon
2018-05-16 13:57 Kamil Chalupnik
2018-05-17 12:40 ` Mokhtar, Amr
2018-05-17 16:15   ` De Lara Guarch, Pablo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1517406868-130533-1-git-send-email-amr.mokhtar@intel.com \
    --to=amr.mokhtar@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).