Skip to content

Commit

Permalink
app/eventdev: check function errors
Browse files Browse the repository at this point in the history
[ upstream commit a8d88bf ]

Fix unchecked return values reported by coverity.

Coverity Issue: 336861
Coverity Issue: 349906
Fixes: 032a965 ("app/eventdev: support Tx adapter")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
  • Loading branch information
PavanNikhilesh authored and kevintraynor committed Dec 11, 2019
1 parent e3edd01 commit f34a476
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/test-eventdev/test_pipeline_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ int
pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)
{
uint16_t i;
int ret;
uint8_t nb_queues = 1;
struct test_pipeline *t = evt_test_priv(test);
struct rte_eth_rxconf rx_conf;
Expand Down Expand Up @@ -187,7 +188,12 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)
struct rte_eth_conf local_port_conf = port_conf;
uint32_t caps = 0;

rte_event_eth_tx_adapter_caps_get(opt->dev_id, i, &caps);
ret = rte_event_eth_tx_adapter_caps_get(opt->dev_id, i, &caps);
if (ret != 0) {
evt_err("failed to get event tx adapter[%d] caps", i);
return ret;
}

if (!(caps & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT))
t->internal_port = 0;

Expand Down

0 comments on commit f34a476

Please sign in to comment.