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

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.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5861c8cb
...@@ -1014,8 +1014,8 @@ static void lan743x_phy_close(struct lan743x_adapter *adapter) ...@@ -1014,8 +1014,8 @@ static void lan743x_phy_close(struct lan743x_adapter *adapter)
static int lan743x_phy_open(struct lan743x_adapter *adapter) static int lan743x_phy_open(struct lan743x_adapter *adapter)
{ {
struct lan743x_phy *phy = &adapter->phy; struct lan743x_phy *phy = &adapter->phy;
struct phy_device *phydev = NULL;
struct device_node *phynode; struct device_node *phynode;
struct phy_device *phydev;
struct net_device *netdev; struct net_device *netdev;
int ret = -EIO; int ret = -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment