From: Jasvinder Singh Date: Thu, 4 Apr 2019 15:45:42 +0000 (+0100) Subject: net/softnic: fix unchecked return value X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5024da517de619912d75e215e113bfac977de785;p=dpdk.git 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 Acked-by: Rami Rosen --- diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c index 57989a5aac..855408e988 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,