projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf31ea7
)
net: phy: xgmiitorgmii: Check read_status results
author
Brandon Maier
<
[email protected]
>
Tue, 26 Jun 2018 17:50:50 +0000
(12:50 -0500)
committer
David S. Miller
<
[email protected]
>
Thu, 28 Jun 2018 07:12:06 +0000
(16:12 +0900)
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 <
[email protected]
>
Reviewed-by: Andrew Lunn <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/phy/xilinx_gmii2rgmii.c
patch
|
blob
|
history
diff --git
a/drivers/net/phy/xilinx_gmii2rgmii.c
b/drivers/net/phy/xilinx_gmii2rgmii.c
index d6f8b64cddbe43ed58d9133b452df523ca16ac5e..74a8782313cf5b0319a7f3bad936926c4f4481da 100644
(file)
--- 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;