Thread (2 messages) 2 messages, 2 authors, 2016-08-01
STALE3631d

[PATCH 1/1] net: e1000: do not use uninitalized variable.

From: Heinrich Schuchardt <hidden>
Date: 2016-07-31 09:31:23
Also in: intel-wired-lan, lkml
Subsystem: intel ethernet drivers, networking drivers, the rest · Maintainers: Tony Nguyen, Przemek Kitszel, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

phy_data has to be set to zero to avoid undefined
behavior.

Signed-off-by: Heinrich Schuchardt <redacted>
---
 drivers/net/ethernet/intel/e1000/e1000_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c
index 8172cf0..456bb07 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_hw.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c
@@ -5390,7 +5390,7 @@ static s32 e1000_set_phy_mode(struct e1000_hw *hw)
 static s32 e1000_set_d3_lplu_state(struct e1000_hw *hw, bool active)
 {
 	s32 ret_val;
-	u16 phy_data;
+	u16 phy_data = 0;
 
 	if (hw->phy_type != e1000_phy_igp)
 		return E1000_SUCCESS;
-- 
2.8.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help