From 799c5c602df35495e300613f7e9b7b54db7f38cf Mon Sep 17 00:00:00 2001 From: Herakliusz Lipiec Date: Tue, 9 May 2017 15:37:34 +0100 Subject: [PATCH] net/i40e: add return value checks Coverity issue: 1379362 Coverity issue: 1379365 Fixes: 71d35259ff67 ("i40e: tear down flow director") Cc: stable@dpdk.org 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 28cc554f5c..b8cfa0f771 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); -- 2.20.1