Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 9bc791341bc9a5c22b ("tg3: convert EEE handling to use linkmode bitmaps")
Reported-by: Srikanth Aithal <sraithal@amd.com>
Tested-by: Srikanth Aithal <sraithal@amd.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Heiner Kallweit and committed by
David S. Miller
0972d1d9 08f62716

+1 -1
+1 -1
drivers/net/ethernet/broadcom/tg3.c
··· 4616 4616 4617 4617 static bool tg3_phy_eee_config_ok(struct tg3 *tp) 4618 4618 { 4619 - struct ethtool_keee eee; 4619 + struct ethtool_keee eee = {}; 4620 4620 4621 4621 if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP)) 4622 4622 return true;