From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0BDFE5961 for ; Mon, 23 May 2016 14:19:52 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 23 May 2016 05:19:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,355,1459839600"; d="scan'208";a="960430350" Received: from gklab-246-018.igk.intel.com (HELO stargo) ([10.217.246.18]) by orsmga001.jf.intel.com with SMTP; 23 May 2016 05:19:48 -0700 Received: by stargo (sSMTP sendmail emulation); Mon, 23 May 2016 14:25:18 +0200 From: Slawomir Mrozowicz To: helin.zhang@intel.com, jingjing.wu@intel.com Cc: dev@dpdk.org, Slawomir Mrozowicz Date: Mon, 23 May 2016 14:25:15 +0200 Message-Id: <1464006315-9537-1-git-send-email-slawomirx.mrozowicz@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] i40e: Unchecked return value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2016 12:19:53 -0000 Calling i40e_switch_tx_queue without checking return value. Fixed by add warning log information if return failed. Fixes: 71d35259ff67 ("i40e: tear down flow director") Coverity ID 13208 Signed-off-by: Slawomir Mrozowicz --- drivers/net/i40e/i40e_fdir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index 8aa41e5..d0bdf2c 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -288,11 +288,14 @@ i40e_fdir_teardown(struct i40e_pf *pf) { struct i40e_hw *hw = I40E_PF_TO_HW(pf); struct i40e_vsi *vsi; + int err = I40E_SUCCESS; vsi = pf->fdir.fdir_vsi; if (!vsi) return; - i40e_switch_tx_queue(hw, vsi->base_queue, FALSE); + err = i40e_switch_tx_queue(hw, vsi->base_queue, FALSE); + if (err) + PMD_DRV_LOG(WARNING, "Failed to do FDIR TX switch off."); i40e_switch_rx_queue(hw, vsi->base_queue, FALSE); i40e_dev_rx_queue_release(pf->fdir.rxq); pf->fdir.rxq = NULL; -- 1.9.1