Skip to content

Commit edbc211

Browse files
Sven Van Asbroeckkuba-moo
Sven Van Asbroeck
authored andcommitted
lan743x: fix use of uninitialized variable
When no devicetree is present, the driver will use an uninitialized variable. Fix by initializing this variable. Fixes: 902a66e ("lan743x: correctly handle chips with internal PHY") Reported-by: kernel test robot <[email protected]> Signed-off-by: Sven Van Asbroeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 5861c8c commit edbc211

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/microchip/lan743x_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,8 @@ static void lan743x_phy_close(struct lan743x_adapter *adapter)
10141014
static int lan743x_phy_open(struct lan743x_adapter *adapter)
10151015
{
10161016
struct lan743x_phy *phy = &adapter->phy;
1017+
struct phy_device *phydev = NULL;
10171018
struct device_node *phynode;
1018-
struct phy_device *phydev;
10191019
struct net_device *netdev;
10201020
int ret = -EIO;
10211021

0 commit comments

Comments
 (0)