lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241219043410.1912288-1-topofeverest8848@gmail.com>
Date: Thu, 19 Dec 2024 04:34:10 +0000
From: Roshan Khatri <topofeverest8848@...il.com>
To: Michael Chan <michael.chan@...adcom.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>
Cc: Roshan Khatri <topofeverest8848@...il.com>,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] net: b44: uninitialized variable in multiple places in b44.c

smatch reported uninitialized variable in multiples places in b44.c.
This patch fixes the uniinitialized variable errors in multiple places
reported by smatch.

Signed-off-by: Roshan Khatri <topofeverest8848@...il.com>
---
 drivers/net/ethernet/broadcom/b44.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
index e5809ad5eb82..9a466c5c4b6c 100644
--- a/drivers/net/ethernet/broadcom/b44.c
+++ b/drivers/net/ethernet/broadcom/b44.c
@@ -314,7 +314,7 @@ static int b44_mdio_write_phylib(struct mii_bus *bus, int phy_id, int location,
 
 static int b44_phy_reset(struct b44 *bp)
 {
-	u32 val;
+	u32 val = 0;
 	int err;
 
 	if (bp->flags & B44_FLAG_EXTERNAL_PHY)
@@ -414,7 +414,7 @@ static inline void b44_wap54g10_workaround(struct b44 *bp)
 
 static int b44_setup_phy(struct b44 *bp)
 {
-	u32 val;
+	u32 val = 0;
 	int err;
 
 	b44_wap54g10_workaround(bp);
@@ -512,7 +512,7 @@ static void b44_link_report(struct b44 *bp)
 
 static void b44_check_phy(struct b44 *bp)
 {
-	u32 bmsr, aux;
+	u32 bmsr = 0, aux = 0;
 
 	if (bp->flags & B44_FLAG_EXTERNAL_PHY) {
 		bp->flags |= B44_FLAG_100_BASE_T;
@@ -544,7 +544,7 @@ static void b44_check_phy(struct b44 *bp)
 		if (!netif_carrier_ok(bp->dev) &&
 		    (bmsr & BMSR_LSTATUS)) {
 			u32 val = br32(bp, B44_TX_CTRL);
-			u32 local_adv, remote_adv;
+			u32 local_adv = 0, remote_adv = 0;
 
 			if (bp->flags & B44_FLAG_FULL_DUPLEX)
 				val |= TX_CTRL_DUPLEX;
@@ -1786,7 +1786,7 @@ static void b44_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo *inf
 static int b44_nway_reset(struct net_device *dev)
 {
 	struct b44 *bp = netdev_priv(dev);
-	u32 bmcr;
+	u32 bmcr = 0;
 	int r;
 
 	spin_lock_irq(&bp->lock);
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ