From: Stephen Hemminger Date: Wed, 26 Sep 2018 09:31:12 +0000 (+0100) Subject: net/netvsc: check return from kvargs process X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9ba102f6b0453e1a8f13b5940fa6268824c68471;p=dpdk.git net/netvsc: check return from kvargs process Should check return value from processing latency value. Coverity issue: 322104 Fixes: a25d39a3eb69 ("net/netvsc: allow tuning latency with devargs") Signed-off-by: Stephen Hemminger --- diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index 3092066ada..8e728d6390 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.