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: <20201112152513.1941-1-TheSven73@gmail.com>
Date:   Thu, 12 Nov 2020 10:25:13 -0500
From:   Sven Van Asbroeck <thesven73@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        Bryan Whitehead <bryan.whitehead@...rochip.com>,
        David S Miller <davem@...emloft.net>
Cc:     Sven Van Asbroeck <thesven73@...il.com>,
        Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
        Andrew Lunn <andrew@...n.ch>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH net v1] lan743x: fix use of uninitialized variable

From: Sven Van Asbroeck <thesven73@...il.com>

When no devicetree is present, the driver will use an
uninitialized variable.

Fix by initializing this variable.

Fixes: 902a66e08cea ("lan743x: correctly handle chips with internal PHY")
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Sven Van Asbroeck <thesven73@...il.com>
---
Tree: git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git # 52755b66ddce

To: Jakub Kicinski <kuba@...nel.org>
To: Bryan Whitehead <bryan.whitehead@...rochip.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>
Cc: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org

 drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 54d721ef3084..0c9b938ee0ea 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -1014,8 +1014,8 @@ static void lan743x_phy_close(struct lan743x_adapter *adapter)
 static int lan743x_phy_open(struct lan743x_adapter *adapter)
 {
 	struct lan743x_phy *phy = &adapter->phy;
+	struct phy_device *phydev = NULL;
 	struct device_node *phynode;
-	struct phy_device *phydev;
 	struct net_device *netdev;
 	int ret = -EIO;
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ