patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [dpdk-dev] [PATCH] app/eventdev: fix unchecked function return values
@ 2020-05-13 20:22 pbhagavatula
  2020-05-14 13:17 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: pbhagavatula @ 2020-05-13 20:22 UTC (permalink / raw)
  To: jerinj; +Cc: dev, Pavan Nikhilesh, stable

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Fix unchecked return values reported by coverity.

Coverity issue: 357755
Fixes: 032a965a8f1d ("app/eventdev: support Tx adapter")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 app/test-eventdev/test_pipeline_common.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
index 84c42b33c..f1c227941 100644
--- a/app/test-eventdev/test_pipeline_common.c
+++ b/app/test-eventdev/test_pipeline_common.c
@@ -392,8 +392,12 @@ pipeline_event_tx_adapter_setup(struct evt_options *opt,
 		if (!(cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) {
 			uint32_t service_id = -1U;
 
-			rte_event_eth_tx_adapter_service_id_get(consm,
-					&service_id);
+			ret = rte_event_eth_tx_adapter_service_id_get(consm,
+								   &service_id);
+			if (ret != -ESRCH && ret != 0) {
+				evt_err("Failed to get Tx adptr service ID\n");
+				return ret;
+			}
 			ret = evt_service_setup(service_id);
 			if (ret) {
 				evt_err("Failed to setup service core"
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-14 13:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 20:22 [dpdk-stable] [dpdk-dev] [PATCH] app/eventdev: fix unchecked function return values pbhagavatula
2020-05-14 13:17 ` Jerin Jacob

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).