diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2016-05-03 22:14:41 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-04 22:14:19 +0200 |
commit | e98a3aabf85f60b80c6ef93e509d38144ca434b1 (patch) | |
tree | 9a6cd126ccfde25d06e8c96031f8b200f8080492 /drivers/net/phy | |
parent | Merge branch 'kill_trans_start' (diff) | |
download | linux-e98a3aabf85f60b80c6ef93e509d38144ca434b1.tar.xz linux-e98a3aabf85f60b80c6ef93e509d38144ca434b1.zip |
mdio_bus: don't return NULL from mdiobus_scan()
I've finally noticed that mdiobus_scan() also returns either NULL or error
value on failure. Return ERR_PTR(-ENODEV) instead of NULL since this is
the error value already filtered out by the callers that want to ignore
the MDIO address scan failure...
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 388f9922647b..09deef4bed09 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -431,7 +431,7 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr) err = phy_device_register(phydev); if (err) { phy_device_free(phydev); - return NULL; + return ERR_PTR(-ENODEV); } return phydev; |