DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix unchecked return in parse devarg
@ 2018-02-08 13:18 Beilei Xing
  2018-02-08 13:38 ` Wu, Jingjing
  2018-02-08 13:40 ` Zhang, Helin
  0 siblings, 2 replies; 4+ messages in thread
From: Beilei Xing @ 2018-02-08 13:18 UTC (permalink / raw)
  To: jingjing.wu, dev, qi.z.zhang

This patch fixes the coverity CHECKED_RETURN issue.

Coverity issue: 261779
Fixes: cfdfca493cae ("net/i40e: fix multiple driver support")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 65a4b7a..508b417 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1107,8 +1107,12 @@ i40e_support_multi_driver(struct rte_eth_dev *dev)
 			    "the first invalid or last valid one is used !",
 			    ETH_I40E_SUPPORT_MULTI_DRIVER);
 
-	rte_kvargs_process(kvlist, ETH_I40E_SUPPORT_MULTI_DRIVER,
-			   i40e_parse_multi_drv_handler, pf);
+	if (rte_kvargs_process(kvlist, ETH_I40E_SUPPORT_MULTI_DRIVER,
+			       i40e_parse_multi_drv_handler, pf) < 0) {
+		rte_kvargs_free(kvlist);
+		return -EINVAL;
+	}
+
 	rte_kvargs_free(kvlist);
 	return 0;
 }
-- 
2.5.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-08 13:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08 13:18 [dpdk-dev] [PATCH] net/i40e: fix unchecked return in parse devarg Beilei Xing
2018-02-08 13:38 ` Wu, Jingjing
2018-02-08 13:44   ` Zhang, Helin
2018-02-08 13:40 ` Zhang, Helin

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).