summaryrefslogtreecommitdiff
path: root/drivers/net/phy/xilinx_gmii2rgmii.c
diff options
context:
space:
mode:
authorBrandon Maier <brandon.maier@rockwellcollins.com>2018-06-26 12:50:50 -0500
committerDavid S. Miller <davem@davemloft.net>2018-06-28 16:12:06 +0900
commit8d0752d11312be830c33e84dfd1016e6a47c2938 (patch)
tree51fde9277faaac731cecd0dec1b8c11aee4d6503 /drivers/net/phy/xilinx_gmii2rgmii.c
parentcf31ea71c0593ca6227bd3f4958c098753267f44 (diff)
net: phy: xgmiitorgmii: Check read_status results
We're ignoring the result of the attached phy device's read_status(). Return it so we can detect errors. Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/xilinx_gmii2rgmii.c')
-rw-r--r--drivers/net/phy/xilinx_gmii2rgmii.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
index d6f8b64cddbe..74a8782313cf 100644
--- a/drivers/net/phy/xilinx_gmii2rgmii.c
+++ b/drivers/net/phy/xilinx_gmii2rgmii.c
@@ -42,8 +42,11 @@ static int xgmiitorgmii_read_status(struct phy_device *phydev)
struct mii_bus *bus = priv->mdio->bus;
int addr = priv->mdio->addr;
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(bus, addr, XILINX_GMII2RGMII_REG);
val &= ~XILINX_GMII2RGMII_SPEED_MASK;