diff options
author | Michal Simek <michal.simek@xilinx.com> | 2016-05-18 12:46:12 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2016-05-24 13:17:59 +0200 |
commit | b733c278d7adc48c71bd06faf359db3d9e385185 (patch) | |
tree | ffac509445c1f6964c49fac2bad7773825a73f13 /drivers/net/phy/lxt.c | |
parent | ef5e821bd89aa059a20841e041221dadbf60aa7d (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/lxt.c')
-rw-r--r-- | drivers/net/phy/lxt.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c index 91838ce5ea..9abc2a84f9 100644 --- a/drivers/net/phy/lxt.c +++ b/drivers/net/phy/lxt.c @@ -49,10 +49,13 @@ static int lxt971_parse_status(struct phy_device *phydev) static int lxt971_startup(struct phy_device *phydev) { - genphy_update_link(phydev); - lxt971_parse_status(phydev); + int ret; - return 0; + ret = genphy_update_link(phydev); + if (ret) + return ret; + + return lxt971_parse_status(phydev); } static struct phy_driver LXT971_driver = { |