]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: zynq_gem: Return error incase of invalid phy address
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Wed, 30 Mar 2016 06:59:49 +0000 (12:29 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 4 Apr 2016 18:28:39 +0000 (20:28 +0200)
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@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/zynq_gem.c

index 103ed6169c0f7b4238f70e8bf5994d2791cdace8..52a8f2760012f87f3582f4878b502fce2711d789 100644 (file)
@@ -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)