summaryrefslogtreecommitdiff
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2016-05-18 12:48:57 +0200
committerMichal Simek <michal.simek@xilinx.com>2016-05-24 13:17:59 +0200
commitef5e821bd89aa059a20841e041221dadbf60aa7d (patch)
tree4561d886f5e471891c407cd784527509f71b841b /drivers/net/phy/phy.c
parent55259e7cda875bff3e0fcfd5fc61478f40872841 (diff)
downloadu-boot-ef5e821bd89aa059a20841e041221dadbf60aa7d.tar.gz
phy: Return correct error code when timeout happens
Return -ETIMEDOUT if timeout happens. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 23c82bb36e..68e752e093 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -248,7 +248,7 @@ int genphy_update_link(struct phy_device *phydev)
if (i > PHY_ANEG_TIMEOUT) {
printf(" TIMEOUT !\n");
phydev->link = 0;
- return 0;
+ return -ETIMEDOUT;
}
if (ctrlc()) {