From: Siva Durga Prasad Paladugu Date: Tue, 26 Feb 2019 12:12:43 +0000 (+0530) Subject: net: phy: Fix return value check phy_probe X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e118badbd629130be3820bb5313ba2f5d6531f02;p=thirdparty%2Fu-boot.git net: phy: Fix return value check phy_probe Don't ignore return value of phy_probe() call as the probe may fail and it needs to be reported. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 0b3388eaa54..2017f595683 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -669,7 +669,10 @@ static struct phy_device *phy_device_create(struct mii_dev *bus, int addr, dev->drv = get_phy_driver(dev, interface); - phy_probe(dev); + if (phy_probe(dev)) { + printf("%s, PHY probe failed\n", __func__); + return NULL; + } if (addr >= 0 && addr < PHY_MAX_ADDR) bus->phymap[addr] = dev;