From 84a4369d338cc99eaa346080a2cd51af3586c16e Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Fri, 30 Sep 2016 22:10:08 +0200 Subject: net/phy: marvell: fix error handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without first assigning to ret it doesn't make sense to check it. Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- 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 6409f14ae2..9a963f6d5e 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; -- cgit v1.2.3