[PATCH] net/phy: marvell: fix error handling
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Fri Sep 30 13:10:08 PDT 2016
Without first assigning to ret it doesn't make sense to check it.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
drivers/net/phy/marvell.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 6409f14ae2e2..9a963f6d5e61 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -198,7 +198,8 @@ static int m88e1121_config_init(struct phy_device *phydev)
if (ret < 0)
return ret;
- phy_write(phydev, MII_MARVELL_PHY_PAGE, MII_MARVELL_PHY_DEFAULT_PAGE);
+ ret = phy_write(phydev, MII_MARVELL_PHY_PAGE,
+ MII_MARVELL_PHY_DEFAULT_PAGE);
if (ret < 0)
return ret;
--
2.9.3
More information about the barebox
mailing list