* [U-Boot] [RESEND PATCH] net: phy: Fix return value check phy_probe
@ 2019-03-04 15:02 Michal Simek
2019-03-04 19:04 ` Joe Hershberger
2019-03-05 18:05 ` [U-Boot] " Joe Hershberger
0 siblings, 2 replies; 3+ messages in thread
From: Michal Simek @ 2019-03-04 15:02 UTC (permalink / raw)
To: u-boot
From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
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>
---
Joe asked for it.
---
drivers/net/phy/phy.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index a508fb550451..e0a925152e8b 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -670,7 +670,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;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [RESEND PATCH] net: phy: Fix return value check phy_probe
2019-03-04 15:02 [U-Boot] [RESEND PATCH] net: phy: Fix return value check phy_probe Michal Simek
@ 2019-03-04 19:04 ` Joe Hershberger
2019-03-05 18:05 ` [U-Boot] " Joe Hershberger
1 sibling, 0 replies; 3+ messages in thread
From: Joe Hershberger @ 2019-03-04 19:04 UTC (permalink / raw)
To: u-boot
On Mon, Mar 4, 2019 at 9:02 AM Michal Simek <michal.simek@xilinx.com> wrote:
>
> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
>
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] net: phy: Fix return value check phy_probe
2019-03-04 15:02 [U-Boot] [RESEND PATCH] net: phy: Fix return value check phy_probe Michal Simek
2019-03-04 19:04 ` Joe Hershberger
@ 2019-03-05 18:05 ` Joe Hershberger
1 sibling, 0 replies; 3+ messages in thread
From: Joe Hershberger @ 2019-03-05 18:05 UTC (permalink / raw)
To: u-boot
Hi Michal,
https://patchwork.ozlabs.org/patch/1051139/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git
Thanks!
-Joe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-05 18:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 15:02 [U-Boot] [RESEND PATCH] net: phy: Fix return value check phy_probe Michal Simek
2019-03-04 19:04 ` Joe Hershberger
2019-03-05 18:05 ` [U-Boot] " Joe Hershberger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.