From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 214DBA04F1; Mon, 9 Dec 2019 10:25:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1DB212C12; Mon, 9 Dec 2019 10:25:45 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DD20323D; Mon, 9 Dec 2019 07:38:05 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Dec 2019 22:38:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,294,1571727600"; d="scan'208";a="413973793" Received: from silpixa00394368.ir.intel.com (HELO silpixa00394368.ger.corp.intel.com) ([10.237.223.193]) by fmsmga006.fm.intel.com with ESMTP; 08 Dec 2019 22:38:03 -0800 From: Gargi Sau To: dev@dpdk.org Cc: stable@dpdk.org Date: Mon, 9 Dec 2019 06:37:56 +0000 Message-Id: <20191209063756.26790-1-gargi.sau@intel.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Mon, 09 Dec 2019 10:25:44 +0100 Subject: [dpdk-dev] [PATCH] examples/ethtool: fix unchecked return value 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" This checks the return value from the function rte_eth_dev_set_vlan_offload. Coverity issue: 350358 Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application") Cc: stable@dpdk.org Signed-off-by: Gargi Sau --- examples/ethtool/lib/rte_ethtool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c index 667d7eaf2..db8150efd 100644 --- a/examples/ethtool/lib/rte_ethtool.c +++ b/examples/ethtool/lib/rte_ethtool.c @@ -402,7 +402,9 @@ rte_ethtool_net_set_rx_mode(uint16_t port_id) } /* Enable Rx vlan filter, VF unspport status is discard */ - rte_eth_dev_set_vlan_offload(port_id, ETH_VLAN_FILTER_MASK); + ret = rte_eth_dev_set_vlan_offload(port_id, ETH_VLAN_FILTER_MASK); + if (ret != 0) + return ret; return 0; } -- 2.17.1