diff options
author | Siva Durga Prasad Paladugu | 2019-03-04 16:02:11 +0100 |
---|---|---|
committer | Joe Hershberger | 2019-05-08 17:27:00 -0500 |
commit | 05eb6a698acbd6465c032d39ea77b79f831f05af (patch) | |
tree | fee018e80c576d09c3ab300496d7e60b4da085ba /drivers/net/phy | |
parent | c689c4867286888099c21e02d2494f047060d06f (diff) |
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/net/phy')
-rw-r--r-- | drivers/net/phy/phy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 04af9166786..c1c1af9abdb 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; |