diff options
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 25ae40233e..35a9ce7ea8 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -405,6 +405,11 @@ int phy_device_connect(struct eth_device *edev, struct mii_bus *bus, int addr, goto out; } + if (!bus) { + ret = -ENODEV; + goto out; + } + if (addr >= 0) { phy = mdiobus_scan(bus, addr); if (IS_ERR(phy)) { |