mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-23 15:41:33 +00:00
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 <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
c689c48672
commit
05eb6a698a
1 changed files with 4 additions and 1 deletions
|
@ -671,7 +671,10 @@ static struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
|
||||||
|
|
||||||
dev->drv = get_phy_driver(dev, interface);
|
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)
|
if (addr >= 0 && addr < PHY_MAX_ADDR)
|
||||||
bus->phymap[addr] = dev;
|
bus->phymap[addr] = dev;
|
||||||
|
|
Loading…
Add table
Reference in a new issue