[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230312155008.7830-1-listdansp@mail.ru>
Date: Sun, 12 Mar 2023 15:50:08 +0000
From: Danila Chernetsov <listdansp@...l.ru>
To: Andrew Lunn <andrew@...n.ch>
Cc: Danila Chernetsov <listdansp@...l.ru>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: [PATCH] net: dsa: vsc73xxx: Fix uninitalized 'val' in vsc73xx_adjust_link
Using uninitialized variable after calls vsc73xx_read
without error checking may cause incorrect driver behavior.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 95711cd5f0b4 ("net: dsa: vsc73xx: Split vsc73xx driver")
Signed-off-by: Danila Chernetsov <listdansp@...l.ru>
---
drivers/net/dsa/vitesse-vsc73xx-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c
index ae55167ce0a6..729005d6cb7e 100644
--- a/drivers/net/dsa/vitesse-vsc73xx-core.c
+++ b/drivers/net/dsa/vitesse-vsc73xx-core.c
@@ -758,7 +758,7 @@ static void vsc73xx_adjust_link(struct dsa_switch *ds, int port,
struct phy_device *phydev)
{
struct vsc73xx *vsc = ds->priv;
- u32 val;
+ u32 val = 0;
/* Special handling of the CPU-facing port */
if (port == CPU_PORT) {
--
2.25.1
Powered by blists - more mailing lists