aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/phy/davicom.c
diff options
context:
space:
mode:
authorMichal Simek2016-05-18 12:46:12 +0200
committerMichal Simek2016-05-24 13:17:59 +0200
commitb733c278d7adc48c71bd06faf359db3d9e385185 (patch)
treeffac509445c1f6964c49fac2bad7773825a73f13 /drivers/net/phy/davicom.c
parentef5e821bd89aa059a20841e041221dadbf60aa7d (diff)
net: phy: Handle phy_startup() error codes properly
Propagate error code from genphy_update_link() to phy startup(). Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/net/phy/davicom.c')
-rw-r--r--drivers/net/phy/davicom.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/phy/davicom.c b/drivers/net/phy/davicom.c
index 0c039fe79ff..0a6e4107ba5 100644
--- a/drivers/net/phy/davicom.c
+++ b/drivers/net/phy/davicom.c
@@ -60,10 +60,13 @@ static int dm9161_parse_status(struct phy_device *phydev)
static int dm9161_startup(struct phy_device *phydev)
{
- genphy_update_link(phydev);
- dm9161_parse_status(phydev);
+ int ret;
- return 0;
+ ret = genphy_update_link(phydev);
+ if (ret)
+ return ret;
+
+ return dm9161_parse_status(phydev);
}
static struct phy_driver DM9161_driver = {