summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy_device.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2023-02-06 09:25:56 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-02-06 09:25:56 -0300
commitab809efaeba0cca20cfcda23852b0ee958f6ea69 (patch)
tree36b168deb9908cba8605bb8fa026bdacc26560db /drivers/net/phy/phy_device.c
parent17f248aa8664ff5b3643491136283e73b5c18166 (diff)
parentd2d11f342b179f1894a901f143ec7c008caba43e (diff)
downloadlinux-stable-ab809efaeba0cca20cfcda23852b0ee958f6ea69.tar.gz
linux-stable-ab809efaeba0cca20cfcda23852b0ee958f6ea69.tar.bz2
linux-stable-ab809efaeba0cca20cfcda23852b0ee958f6ea69.zip
Merge remote-tracking branch 'torvalds/master' into perf/core
To sync with libbpf, etc. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r--drivers/net/phy/phy_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 716870a4499c..607aa786c8cb 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1517,7 +1517,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
* another mac interface, so we should create a device link between
* phy dev and mac dev.
*/
- if (phydev->mdio.bus->parent && dev->dev.parent != phydev->mdio.bus->parent)
+ if (dev && phydev->mdio.bus->parent && dev->dev.parent != phydev->mdio.bus->parent)
phydev->devlink = device_link_add(dev->dev.parent, &phydev->mdio.dev,
DL_FLAG_PM_RUNTIME | DL_FLAG_STATELESS);