提交 9bd73715 编写于 作者: D Dan Carpenter 提交者: Grant Likely

of: check for IS_ERR()

get_phy_device() can return an ERR_PTR()
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 b0c06027
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册