From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Mrzyglod Subject: [PATCH] i40e: fix unchecked return value Date: Tue, 24 May 2016 09:25:34 +0200 Message-ID: <1464074734-199475-1-git-send-email-danielx.t.mrzyglod@intel.com> Cc: dev@dpdk.org, Daniel Mrzyglod To: helin.zhang@intel.com, jingjing.wu@intel.com Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 612D42C6B for ; Tue, 24 May 2016 08:22:50 +0200 (CEST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Calling i40e_switch_rx_queue without checking return value. Fixed by add warning log information if return failed. Fixes: 71d35259ff67 ("i40e: tear down flow director") Coverity ID 13198 Signed-off-by: Daniel Mrzyglod --- 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..ce6d916 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -288,12 +288,15 @@ 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); - i40e_switch_rx_queue(hw, vsi->base_queue, FALSE); + err = i40e_switch_rx_queue(hw, vsi->base_queue, FALSE); + if (err) + PMD_DRV_LOG(WARNING, "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); -- 2.5.5