From: Pavan Nikhilesh Date: Wed, 13 May 2020 20:22:48 +0000 (+0530) Subject: app/eventdev: check Tx adapter service ID X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=40984bf253e1bccea72a38b2a0edd7c16ea22831;p=dpdk.git app/eventdev: check Tx adapter service ID 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 Acked-by: Jerin Jacob --- diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c index 84c42b33ce..17088b1b48 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -392,12 +392,16 @@ 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"); + return ret; + } ret = evt_service_setup(service_id); if (ret) { evt_err("Failed to setup service core" - " for Tx adapter\n"); + " for Tx adapter"); return ret; } }