Patchwork [net-next,04/15] e1000e: potential incorrect return for e1000_setup_copper_link_80003es2lan

login
register
mail settings
Submitter Jeff Kirsher
Date Feb. 13, 2012, 9:47 p.m.
Message ID <1329169670-5403-5-git-send-email-jeffrey.t.kirsher@intel.com>
Download mbox | patch
Permalink /patch/140988/
State Accepted
Delegated to: David Miller
Headers show

Comments

Jeff Kirsher - Feb. 13, 2012, 9:47 p.m.
From: Bruce Allan <bruce.w.allan@intel.com>

In the unlikely event that e1000e_setup_copper_link() returns an error,
the returned error code value is not propogated to the caller of
e1000_setup_copper_link_80003es2lan().

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/e1000e/80003es2lan.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

Patch

diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c
index 37e7864..99eb090 100644
--- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c
+++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c
@@ -1147,9 +1147,7 @@  static s32 e1000_setup_copper_link_80003es2lan(struct e1000_hw *hw)
 	if (ret_val)
 		return ret_val;
 
-	ret_val = e1000e_setup_copper_link(hw);
-
-	return 0;
+	return e1000e_setup_copper_link(hw);
 }
 
 /**