From patchwork Wed Apr 10 02:46:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenbo Xia X-Patchwork-Id: 52524 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B0D15F14; Wed, 10 Apr 2019 05:06:32 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id A1C6D58FE; Wed, 10 Apr 2019 05:06:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Apr 2019 20:06:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,331,1549958400"; d="scan'208";a="141505515" Received: from xiachenbo.sh.intel.com ([10.67.119.199]) by fmsmga007.fm.intel.com with ESMTP; 09 Apr 2019 20:06:27 -0700 From: Chenbo Xia To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com, stable@dpdk.org Date: Wed, 10 Apr 2019 02:46:36 +0000 Message-Id: <20190410024636.15064-1-chenbo.xia@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] app/testpmd: fix return value check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Signed-off-by: Chenbo Xia Acked-by: --- 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,