Commit 72233116 authored by Brandon Maier's avatar Brandon Maier Committed by Greg Kroah-Hartman

net: phy: xgmiitorgmii: Check read_status results

[ Upstream commit 8d0752d1 ]

We're ignoring the result of the attached phy device's read_status().
Return it so we can detect errors.
Signed-off-by: default avatarBrandon Maier <brandon.maier@rockwellcollins.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 22b6598d
......@@ -40,8 +40,11 @@ static int xgmiitorgmii_read_status(struct phy_device *phydev)
{
struct gmii2rgmii *priv = phydev->priv;
u16 val = 0;
int err;
priv->phy_drv->read_status(phydev);
err = priv->phy_drv->read_status(phydev);
if (err < 0)
return err;
val = mdiobus_read(phydev->mdio.bus, priv->addr, XILINX_GMII2RGMII_REG);
val &= ~XILINX_GMII2RGMII_SPEED_MASK;
......
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