summaryrefslogtreecommitdiff
path: root/drivers/net/phy/phy_device.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-02-02 14:49:55 -0800
committerJakub Kicinski <kuba@kernel.org>2023-02-02 14:49:55 -0800
commit82b4a9412b4de2f68679f1403f1d229390ace27e (patch)
tree920454da3f6d509be95ae3c5c72921bfddc39c20 /drivers/net/phy/phy_device.c
parentb18ea3d9d214dfb23b0b6bd2acc121cb0d0fa2c5 (diff)
parentedb9b8f380c3413bf783475279b1a941c7e5cec1 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
net/core/gro.c 7d2c89b32587 ("skb: Do mix page pool and page referenced frags in GRO") b1a78b9b9886 ("net: add support for ipv4 big tcp") https://lore.kernel.org/all/20230203094454.5766f160@canb.auug.org.au/ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
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 9ba8f973f26f..a3917c7acbd3 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1538,7 +1538,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);