From: Wenzhuo Lu Date: Fri, 5 Jun 2015 05:21:36 +0000 (+0800) Subject: ixgbe/base: check return value after calling X-Git-Tag: spdx-start~9100 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=683a2c8a28601078f6a2a990db433bce349ccb52;p=dpdk.git ixgbe/base: check return value after calling This patch moves the check of the return value from ixgbe_start_hw_generic after the function is called. Previously we had the code to disable relaxed ordering in between, which seems a bit out of place. Signed-off-by: Wenzhuo Lu Acked-by: Helin Zhang --- diff --git a/drivers/net/ixgbe/base/ixgbe_82598.c b/drivers/net/ixgbe/base/ixgbe_82598.c index 75e3e89b4a..9bdbce481e 100644 --- a/drivers/net/ixgbe/base/ixgbe_82598.c +++ b/drivers/net/ixgbe/base/ixgbe_82598.c @@ -259,6 +259,8 @@ s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) DEBUGFUNC("ixgbe_start_hw_82598"); ret_val = ixgbe_start_hw_generic(hw); + if (ret_val) + return ret_val; /* Disable relaxed ordering */ for (i = 0; ((i < hw->mac.max_tx_queues) && @@ -277,8 +279,7 @@ s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) } /* set the completion timeout for interface */ - if (ret_val == IXGBE_SUCCESS) - ixgbe_set_pcie_completion_timeout(hw); + ixgbe_set_pcie_completion_timeout(hw); return ret_val; }