ixgbe/base: check return value after calling
authorWenzhuo Lu <wenzhuo.lu@intel.com>
Fri, 5 Jun 2015 05:21:36 +0000 (13:21 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 15 Jun 2015 16:24:40 +0000 (18:24 +0200)
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 <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
drivers/net/ixgbe/base/ixgbe_82598.c

index 75e3e89..9bdbce4 100644 (file)
@@ -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;
 }