DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] app/testpmd: fix return value check
@ 2019-04-10  2:46 Chenbo Xia
  2019-04-10  2:46 ` Chenbo Xia
  2019-04-10  4:34 ` Rami Rosen
  0 siblings, 2 replies; 6+ messages in thread
From: Chenbo Xia @ 2019-04-10  2:46 UTC (permalink / raw)
  To: dev; +Cc: wenzhuo.lu, jingjing.wu, bernard.iremonger, stable

Fix unchecked return value issue for rte_eth_dev_configure.

Coverity issue: 195021
Fixes: 2a977b891f99 ("app/testpmd: fix DCB configuration")
Cc: stable@dpdk.org

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
---
 app/test-pmd/testpmd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index aeaa74c98..a52c37229 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2960,8 +2960,9 @@ init_port_dcb_config(portid_t pid,
 	port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_VLAN_FILTER;
 
 	/* re-configure the device . */
-	rte_eth_dev_configure(pid, nb_rxq, nb_rxq, &port_conf);
-
+	retval = rte_eth_dev_configure(pid, nb_rxq, nb_rxq, &port_conf);
+	if (retval < 0)
+		return retval;
 	rte_eth_dev_info_get(pid, &rte_port->dev_info);
 
 	/* If dev_info.vmdq_pool_base is greater than 0,
-- 
2.17.1

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

end of thread, other threads:[~2019-04-11 19:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-10  2:46 [dpdk-dev] [PATCH v1] app/testpmd: fix return value check Chenbo Xia
2019-04-10  2:46 ` Chenbo Xia
2019-04-10  4:34 ` Rami Rosen
2019-04-10  4:34   ` Rami Rosen
2019-04-11 19:29   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-04-11 19:29     ` Ferruh Yigit

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