aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/of_mdio.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-04-28 03:07:29 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-04-28 03:07:29 -0400
commit9bd73715a1f83f640937c121d22fa8dbaab73002 (patch)
tree6c4bea7afca0a2e1423bd89d28dd78498af1db26 /drivers/of/of_mdio.c
parentb0c06027c7d18d99e6f5e81382a7f06a8080b084 (diff)
of: check for IS_ERR()
get_phy_device() can return an ERR_PTR() Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/of/of_mdio.c')
-rw-r--r--drivers/of/of_mdio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 18ecae4a4375..b4748337223b 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -69,7 +69,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
69 } 69 }
70 70
71 phy = get_phy_device(mdio, be32_to_cpup(addr)); 71 phy = get_phy_device(mdio, be32_to_cpup(addr));
72 if (!phy) { 72 if (!phy || IS_ERR(phy)) {
73 dev_err(&mdio->dev, "error probing PHY at address %i\n", 73 dev_err(&mdio->dev, "error probing PHY at address %i\n",
74 *addr); 74 *addr);
75 continue; 75 continue;