[U-Boot] [PATCH] net: zynq_gem: Return error incase of invalid phy address

Michal Simek michal.simek at xilinx.com
Thu Mar 31 10:49:51 CEST 2016


From: Siva Durga Prasad Paladugu <siva.durga.paladugu at xilinx.com>

Return error from probe in case of invalid phy address.
This fixes the issue of uboot crash if phy is not detected.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 drivers/net/zynq_gem.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 103ed6169c0f..52a8f2760012 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -638,9 +638,7 @@ static int zynq_gem_probe(struct udevice *dev)
 	if (ret)
 		return ret;
 
-	zynq_phy_init(dev);
-
-	return 0;
+	return zynq_phy_init(dev);
 }
 
 static int zynq_gem_remove(struct udevice *dev)
-- 
1.9.1



More information about the U-Boot mailing list