Commit edbc2111 authored by Sven Van Asbroeck's avatar Sven Van Asbroeck Committed by Jakub Kicinski
Browse files

lan743x: fix use of uninitialized variable



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

Fix by initializing this variable.

Fixes: 902a66e0 ("lan743x: correctly handle chips with internal PHY")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarSven Van Asbroeck <thesven73@gmail.com>
Link: https://lore.kernel.org/r/20201112152513.1941-1-TheSven73@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5861c8cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;