From: Siva Durga Prasad Paladugu Date: Mon, 4 Mar 2019 15:02:11 +0000 (+0100) Subject: net: phy: Fix return value check phy_probe X-Git-Tag: v2019.07-rc2~12^2~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=05eb6a698acbd6465c032d39ea77b79f831f05af;p=oweals%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 Acked-by: Joe Hershberger --- diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 04af916678..c1c1af9abd 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -671,7 +671,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;