aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2012-02-08 02:55:14 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-02-13 13:15:03 -0800
commitd7eb33840bee3c8de3f64f3861350bcfac3eaf82 (patch)
treec418fa4cf987a6c7175d4917103f1c523e0eca21 /drivers/net/ethernet/intel
parente1000e: cleanup: always return 0 (diff)
downloadlinux-dev-d7eb33840bee3c8de3f64f3861350bcfac3eaf82.tar.xz
linux-dev-d7eb33840bee3c8de3f64f3861350bcfac3eaf82.zip
e1000e: potentially incorrect return for e1000_set_d3_lplu_state_ich8lan
In the unlikely event that e1e_wphy() returns an error, the returned error code is not propogated to the caller of e1000_set_d3_lplu_state_ich8lan(). With this change, there is a rare possibility that ret_val might not get set so it must be initialized. 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>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/e1000e/ich8lan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index ce348cd99d53..5a55a6134a3b 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -2030,7 +2030,7 @@ static s32 e1000_set_d3_lplu_state_ich8lan(struct e1000_hw *hw, bool active)
{
struct e1000_phy_info *phy = &hw->phy;
u32 phy_ctrl;
- s32 ret_val;
+ s32 ret_val = 0;
u16 data;
phy_ctrl = er32(PHY_CTRL);
@@ -2096,7 +2096,7 @@ static s32 e1000_set_d3_lplu_state_ich8lan(struct e1000_hw *hw, bool active)
ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG, data);
}
- return 0;
+ return ret_val;
}
/**