From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Subject: [dpdk-dev] [PATCH] net/netvsc: check return from kvargs_process
Date: Wed, 26 Sep 2018 10:31:12 +0100 [thread overview]
Message-ID: <20180926093112.24235-1-sthemmin@microsoft.com> (raw)
Should check return value from processing latency value.
Coverity issue: 322104
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
Patch against dpdk-next-net
drivers/net/netvsc/hn_ethdev.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index b67cce1ba8f5..8845fc0e6176 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -167,6 +167,7 @@ static int hn_parse_args(const struct rte_eth_dev *dev)
NULL
};
struct rte_kvargs *kvlist;
+ int ret;
if (!devargs)
return 0;
@@ -180,9 +181,12 @@ static int hn_parse_args(const struct rte_eth_dev *dev)
return -EINVAL;
}
- rte_kvargs_process(kvlist, "latency", hn_set_latency, hv);
+ ret = rte_kvargs_process(kvlist, "latency", hn_set_latency, hv);
+ if (ret)
+ PMD_DRV_LOG(ERR, "Unable to process latency arg\n");
+
rte_kvargs_free(kvlist);
- return 0;
+ return ret;
}
/* Update link status.
--
2.17.1
next reply other threads:[~2018-09-26 9:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 9:31 Stephen Hemminger [this message]
2018-10-01 14:56 ` 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=20180926093112.24235-1-sthemmin@microsoft.com \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=sthemmin@microsoft.com \
/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).