Skip to content

Commit

Permalink
lan743x: fix use of uninitialized variable
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
Sven Van Asbroeck authored and kuba-moo committed Nov 12, 2020
1 parent 5861c8c commit edbc211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/microchip/lan743x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit edbc211

Please sign in to comment.