summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSven Van Asbroeck <thesven73@gmail.com>2020-11-12 16:25:13 +0100
committerJakub Kicinski <kuba@kernel.org>2020-11-12 19:03:16 +0100
commitedbc21113bde13ca3d06eec24b621b1f628583dd (patch)
tree5cee394dc25e3d196589f88c6084a72ced839994 /drivers
parentMerge branch 'net-udp-fix-fast-frag0-udp-gro' (diff)
downloadlinux-edbc21113bde13ca3d06eec24b621b1f628583dd.tar.xz
linux-edbc21113bde13ca3d06eec24b621b1f628583dd.zip
lan743x: fix use of uninitialized variable
When no devicetree is present, the driver will use an uninitialized variable. Fix by initializing this variable. Fixes: 902a66e08cea ("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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/microchip/lan743x_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 173158656559..e2c99d909247 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -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;