projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0c0602
)
of: check for IS_ERR()
author
Dan Carpenter
<error27@gmail.com>
Wed, 28 Apr 2010 07:07:29 +0000
(
01:07
-0600)
committer
Grant Likely
<grant.likely@secretlab.ca>
Wed, 28 Apr 2010 07:07:29 +0000
(
01:07
-0600)
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>
drivers/of/of_mdio.c
patch
|
blob
|
history
diff --git
a/drivers/of/of_mdio.c
b/drivers/of/of_mdio.c
index 18ecae4a4375d461957b04ee8171f1e5e1434b8c..b4748337223b43d28aa7fb11d7eb788ec29d6da4 100644
(file)
--- 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)
}
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;