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

Commit 9bd73715 authored by Dan Carpenter's avatar Dan Carpenter Committed by Grant Likely
Browse files

of: check for IS_ERR()



get_phy_device() can return an ERR_PTR()

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent b0c06027
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
		}

		phy = get_phy_device(mdio, be32_to_cpup(addr));
		if (!phy) {
		if (!phy || IS_ERR(phy)) {
			dev_err(&mdio->dev, "error probing PHY at address %i\n",
				*addr);
			continue;