Commit b4368d2b authored by Antoine Tenart's avatar Antoine Tenart Committed by David S. Miller

net: phy: mscc: improve vsc8514/8584_config_init consistency

All PHY read and write return values are checked for errors in
vsc8514_config_init and vsc8584_config_init, except for one. Fix this.
Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d4a76dc7
...@@ -1375,8 +1375,10 @@ static int vsc8584_config_init(struct phy_device *phydev) ...@@ -1375,8 +1375,10 @@ static int vsc8584_config_init(struct phy_device *phydev)
goto err; goto err;
} }
phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, ret = phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS,
MSCC_PHY_PAGE_EXTENDED_GPIO); MSCC_PHY_PAGE_EXTENDED_GPIO);
if (ret)
goto err;
val = phy_base_read(phydev, MSCC_PHY_MAC_CFG_FASTLINK); val = phy_base_read(phydev, MSCC_PHY_MAC_CFG_FASTLINK);
val &= ~MAC_CFG_MASK; val &= ~MAC_CFG_MASK;
...@@ -1774,8 +1776,10 @@ static int vsc8514_config_init(struct phy_device *phydev) ...@@ -1774,8 +1776,10 @@ static int vsc8514_config_init(struct phy_device *phydev)
if (phy_package_init_once(phydev)) if (phy_package_init_once(phydev))
vsc8514_config_pre_init(phydev); vsc8514_config_pre_init(phydev);
phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, ret = phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS,
MSCC_PHY_PAGE_EXTENDED_GPIO); MSCC_PHY_PAGE_EXTENDED_GPIO);
if (ret)
goto err;
val = phy_base_read(phydev, MSCC_PHY_MAC_CFG_FASTLINK); val = phy_base_read(phydev, MSCC_PHY_MAC_CFG_FASTLINK);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment