Commit 0972d1d9 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

tg3: fix bug caused by uninitialized variable

The reported bug is caused by using mii_eee_cap1_mod_linkmode_t()
with an uninitialized bitmap. Fix this by zero-initializing the
struct containing the bitmap.

Fixes: 9bc79134 ("tg3: convert EEE handling to use linkmode bitmaps")
Reported-by: default avatarSrikanth Aithal <sraithal@amd.com>
Tested-by: default avatarSrikanth Aithal <sraithal@amd.com>
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 08f62716
......@@ -4616,7 +4616,7 @@ static int tg3_init_5401phy_dsp(struct tg3 *tp)
static bool tg3_phy_eee_config_ok(struct tg3 *tp)
{
struct ethtool_keee eee;
struct ethtool_keee eee = {};
if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP))
return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment