From: Jasvinder Singh <jasvinder.singh@intel.com>
To: dev@dpdk.org
Cc: cristian.dumitrescu@intel.com
Subject: [dpdk-dev] [PATCH] net/softnic: fix unchecked return value
Date: Thu, 4 Apr 2019 16:45:42 +0100 [thread overview]
Message-ID: <20190404154542.48110-1-jasvinder.singh@intel.com> (raw)
Fix unchecked return value issue reported by Coverity.
Coverity ID 336852
Fixes: a958a5c07f4b ("net/softnic: support service cores")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
drivers/net/softnic/rte_eth_softnic_thread.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c
index 57989a5aa..855408e98 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,
--
2.17.1
next reply other threads:[~2019-04-04 15:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 15:45 Jasvinder Singh [this message]
2019-04-04 15:45 ` Jasvinder Singh
2019-04-04 17:20 ` Rami Rosen
2019-04-04 17:20 ` Rami Rosen
2019-04-04 17:34 ` Ferruh Yigit
2019-04-04 17:34 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190404154542.48110-1-jasvinder.singh@intel.com \
--to=jasvinder.singh@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).