app/testpmd: fix return value check
authorChenbo Xia <chenbo.xia@intel.com>
Wed, 10 Apr 2019 02:46:36 +0000 (02:46 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 12 Apr 2019 09:02:02 +0000 (11:02 +0200)
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>
Acked-by: Rami Rosen <ramirose@gmail.com>
app/test-pmd/testpmd.c

index 2e99d99..d01165f 100644 (file)
@@ -3037,8 +3037,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,