Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e98a3aab authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by David S. Miller
Browse files

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: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4d659fcb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;