mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
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>
This commit is contained in:
parent
4d659fcb20
commit
e98a3aabf8
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue