From: Mark Rustad Date: Sat, 8 Aug 2015 23:27:46 +0000 (-0700) Subject: ixgbe: Only clear adapter_stopped if ixgbe_setup_fc succeeded X-Git-Tag: v5.15~14822^2~279^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3507a9b8c9d1684b5095c97f587ee46184e590da;p=platform%2Fkernel%2Flinux-starfive.git ixgbe: Only clear adapter_stopped if ixgbe_setup_fc succeeded A logic error here results in the adapter_stopped flag only being cleared when ixgbe_setup_fc returns an error. Correct the logic. Signed-off-by: Mark Rustad Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index b620d7a6..98e1ddd 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c @@ -297,13 +297,13 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw) /* Setup flow control */ ret_val = ixgbe_setup_fc(hw); - if (!ret_val) - return 0; + if (ret_val) + return ret_val; /* Clear adapter stopped flag */ hw->adapter_stopped = false; - return ret_val; + return 0; } /**