From patchwork Tue May 9 14:37:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herakliusz Lipiec X-Patchwork-Id: 24167 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 [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 9A23A68C1; Tue, 9 May 2017 16:23:51 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 20F8E68A9 for ; Tue, 9 May 2017 16:23:49 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2017 07:23:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,314,1491289200"; d="scan'208";a="97597832" Received: from silpixa00378492.ir.intel.com (HELO silpixa00378492.ger.corp.intel.com) ([10.237.223.65]) by orsmga005.jf.intel.com with ESMTP; 09 May 2017 07:23:47 -0700 From: Herakliusz Lipiec To: helin.zhang@intel.com, jingjing.wu@intel.com Cc: dev@dpdk.org Date: Tue, 9 May 2017 15:37:34 +0100 Message-Id: <1494340654-29221-1-git-send-email-herakliusz.lipiec@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [DPDK] net/i40e: add return value checks 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" Coverity issue: 1379362 Coverity issue: 1379365 Fixes: 71d35259ff67 ("i40e: tear down flow director") Signed-off-by: Herakliusz Lipiec Acked-by: Helin Zhang --- drivers/net/i40e/i40e_fdir.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index 28cc554..b8cfa0f 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -300,8 +300,12 @@ i40e_fdir_teardown(struct i40e_pf *pf) vsi = pf->fdir.fdir_vsi; if (!vsi) return; - i40e_switch_tx_queue(hw, vsi->base_queue, FALSE); - i40e_switch_rx_queue(hw, vsi->base_queue, FALSE); + int err = i40e_switch_tx_queue(hw, vsi->base_queue, FALSE); + if (err) + PMD_DRV_LOG(DEBUG, "Failed to do FDIR TX switch off"); + err = i40e_switch_rx_queue(hw, vsi->base_queue, FALSE); + if (err) + PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off"); i40e_dev_rx_queue_release(pf->fdir.rxq); pf->fdir.rxq = NULL; i40e_dev_tx_queue_release(pf->fdir.txq);