|
@@ -404,17 +404,11 @@ struct phy *phy_get(struct device *dev, const char *string)
|
|
|
index = of_property_match_string(dev->of_node, "phy-names",
|
|
|
string);
|
|
|
phy = of_phy_get(dev, index);
|
|
|
- if (IS_ERR(phy)) {
|
|
|
- dev_err(dev, "unable to find phy\n");
|
|
|
- return phy;
|
|
|
- }
|
|
|
} else {
|
|
|
phy = phy_lookup(dev, string);
|
|
|
- if (IS_ERR(phy)) {
|
|
|
- dev_err(dev, "unable to find phy\n");
|
|
|
- return phy;
|
|
|
- }
|
|
|
}
|
|
|
+ if (IS_ERR(phy))
|
|
|
+ return phy;
|
|
|
|
|
|
if (!try_module_get(phy->ops->owner))
|
|
|
return ERR_PTR(-EPROBE_DEFER);
|