aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2006-06-27 12:08:09 -0400
committerAuke Kok <juke-jan.h.kok@intel.com>2006-06-27 12:08:09 -0400
commit592600a0536f0d5aab4dc95f19515a37d03430f8 (patch)
tree94b166da5afa2f5494e5154e6ef7109990d2c112 /drivers/net
parentee04022a21764a12e29eee144b72344ebfe0a55c (diff)
e1000: check return value of _get_speed_and_duplex
We were not checking the return value of get_speed_and_duplex properly, whih may contain an error value. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/e1000/e1000_hw.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 37eb351b4c9b..784f9505864a 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -2737,8 +2737,12 @@ e1000_check_for_link(struct e1000_hw *hw)
2737 */ 2737 */
2738 if(hw->tbi_compatibility_en) { 2738 if(hw->tbi_compatibility_en) {
2739 uint16_t speed, duplex; 2739 uint16_t speed, duplex;
2740 e1000_get_speed_and_duplex(hw, &speed, &duplex); 2740 ret_val = e1000_get_speed_and_duplex(hw, &speed, &duplex);
2741 if(speed != SPEED_1000) { 2741 if (ret_val) {
2742 DEBUGOUT("Error getting link speed and duplex\n");
2743 return ret_val;
2744 }
2745 if (speed != SPEED_1000) {
2742 /* If link speed is not set to gigabit speed, we do not need 2746 /* If link speed is not set to gigabit speed, we do not need
2743 * to enable TBI compatibility. 2747 * to enable TBI compatibility.
2744 */ 2748 */