diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2024-02-09 07:47:39 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-12 12:12:09 +0100 |
commit | 0972d1d979ccfd2b71ef36a5a2b1ad092be21bb9 (patch) | |
tree | f9d0165087cb069b946eeb6f33ad5ed14523ffa5 /drivers/net/ethernet/broadcom | |
parent | Merge branch 'dsa-realtek-common' (diff) | |
download | linux-0972d1d979ccfd2b71ef36a5a2b1ad092be21bb9.tar.xz linux-0972d1d979ccfd2b71ef36a5a2b1ad092be21bb9.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 50f674031f72..7d0a2f5f3282 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -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; |