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 DB72EA04F1; Mon, 9 Dec 2019 13:07:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E4FE2C12; Mon, 9 Dec 2019 13:07:19 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id EDD351F5; Mon, 9 Dec 2019 13:07:17 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Dec 2019 04:07:16 -0800 X-IronPort-AV: E=Sophos;i="5.69,294,1571727600"; d="scan'208";a="206874309" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.46]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 09 Dec 2019 04:07:15 -0800 Date: Mon, 9 Dec 2019 12:07:12 +0000 From: Bruce Richardson To: Gargi Sau Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20191209120712.GA98@bricha3-MOBL.ger.corp.intel.com> References: <20191209063756.26790-1-gargi.sau@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191209063756.26790-1-gargi.sau@intel.com> User-Agent: Mutt/1.12.1 (2019-06-15) Subject: Re: [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" On Mon, Dec 09, 2019 at 06:37:56AM +0000, Gargi Sau wrote: > 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; > Looks ok to me. Acked-by: Bruce Richardson