diff options
author | Michal Simek <michal.simek@xilinx.com> | 2016-05-18 12:37:22 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2016-05-24 13:17:55 +0200 |
commit | 55259e7cda875bff3e0fcfd5fc61478f40872841 (patch) | |
tree | 563ef5c99ff77558b2b27247003b48da4ac4419b /drivers/net/xilinx_emaclite.c | |
parent | ed0cea7c5271cbfd37089f3a6392ba383eda06f7 (diff) | |
download | u-boot-55259e7cda875bff3e0fcfd5fc61478f40872841.tar.gz |
net: xilinx: Handle error value from phy_startup()
Handle error returned by phy_startup() properly.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/net/xilinx_emaclite.c')
-rw-r--r-- | drivers/net/xilinx_emaclite.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 5862bf0a7e..7b85aa0463 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -250,7 +250,7 @@ static void emaclite_stop(struct udevice *dev) static int setup_phy(struct udevice *dev) { - int i; + int i, ret; u16 phyreg; struct xemaclite *emaclite = dev_get_priv(dev); struct phy_device *phydev; @@ -302,7 +302,9 @@ static int setup_phy(struct udevice *dev) phydev->advertising = supported; emaclite->phydev = phydev; phy_config(phydev); - phy_startup(phydev); + ret = phy_startup(phydev); + if (ret) + return ret; if (!phydev->link) { printf("%s: No link.\n", phydev->dev->name); |