From: Beilei Xing Date: Thu, 8 Feb 2018 13:18:12 +0000 (+0800) Subject: net/i40e: check multi-driver option parsing X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7469a495aec98082bcd4219cf7a25c6c3867c11a;p=dpdk.git net/i40e: check multi-driver option parsing This patch fixes the coverity CHECKED_RETURN issue. Coverity issue: 261779 Fixes: cfdfca493cae ("net/i40e: fix multiple driver support") Cc: stable@dpdk.org Reported-by: John McNamara Signed-off-by: Beilei Xing Acked-by: Jingjing Wu Acked-by: Helin Zhang --- diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 65a4b7ad74..508b4171c0 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; }