summaryrefslogtreecommitdiff
path: root/drivers/net/softnic
diff options
context:
space:
mode:
authorJasvinder Singh <jasvinder.singh@intel.com>2019-04-04 16:45:42 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-04-05 17:45:22 +0200
commit5024da517de619912d75e215e113bfac977de785 (patch)
treedbba81ad8c58cea619b1688979c83d25c17d05e5 /drivers/net/softnic
parent9ea1b3ccfcfd556ec5144fa91041cf8f86814c5f (diff)
downloaddpdk-5024da517de619912d75e215e113bfac977de785.zip
dpdk-5024da517de619912d75e215e113bfac977de785.tar.gz
dpdk-5024da517de619912d75e215e113bfac977de785.tar.xz
net/softnic: fix unchecked return value
Fix unchecked return value issue reported by Coverity. Coverity issue: 336852 Fixes: a958a5c07f4b ("net/softnic: support service cores") Cc: stable@dpdk.org Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com> Acked-by: Rami Rosen <ramirose@gmail.com>
Diffstat (limited to 'drivers/net/softnic')
-rw-r--r--drivers/net/softnic/rte_eth_softnic_thread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c
index 57989a5..855408e 100644
--- a/drivers/net/softnic/rte_eth_softnic_thread.c
+++ b/drivers/net/softnic/rte_eth_softnic_thread.c
@@ -137,7 +137,10 @@ thread_sc_service_up(struct pmd_internals *softnic, uint32_t thread_id)
uint16_t port_id;
/* service params */
- rte_eth_dev_get_port_by_name(softnic->params.name, &port_id);
+ status = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id);
+ if (status)
+ return status;
+
dev = &rte_eth_devices[port_id];
snprintf(service_params.name, sizeof(service_params.name), "%s_%u",
softnic->params.name,