diff options
-rw-r--r-- | drivers/net/phy/phy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 7132516aa1..25ae40233e 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -323,7 +323,7 @@ static struct phy_device *of_mdio_find_phy(struct eth_device *edev) if (!IS_ENABLED(CONFIG_OFDEVICE)) return NULL; - if (!edev->parent->device_node) + if (!edev->parent || !edev->parent->device_node) return NULL; phy_node = of_parse_phandle(edev->parent->device_node, "phy-handle", 0); |