aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>2019-03-04 16:02:11 +0100
committerJoe Hershberger <joe.hershberger@ni.com>2019-05-08 17:27:00 -0500
commit05eb6a698acbd6465c032d39ea77b79f831f05af (patch)
treefee018e80c576d09c3ab300496d7e60b4da085ba /drivers
parentc689c4867286888099c21e02d2494f047060d06f (diff)
downloadu-boot-05eb6a698acbd6465c032d39ea77b79f831f05af.zip
u-boot-05eb6a698acbd6465c032d39ea77b79f831f05af.tar.gz
u-boot-05eb6a698acbd6465c032d39ea77b79f831f05af.tar.bz2
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/phy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 04af916..c1c1af9 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;