lan743x: fix use of uninitialized variable

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

Fix by initializing this variable.

Fixes: 902a66e08c ("lan743x: correctly handle chips with internal PHY")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
Link: https://lore.kernel.org/r/20201112152513.1941-1-TheSven73@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Sven Van Asbroeck 2020-11-12 10:25:13 -05:00 committed by Jakub Kicinski
parent 5861c8cb1c
commit edbc21113b
1 changed files with 1 additions and 1 deletions

View File

@ -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;