aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy/phy-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/phy/phy-core.c')
-rw-r--r--drivers/phy/phy-core.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 5f5b0f4be5be..6c738376daff 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -176,6 +176,8 @@ int phy_init(struct phy *phy)
176 dev_err(&phy->dev, "phy init failed --> %d\n", ret); 176 dev_err(&phy->dev, "phy init failed --> %d\n", ret);
177 goto out; 177 goto out;
178 } 178 }
179 } else {
180 ret = 0; /* Override possible ret == -ENOTSUPP */
179 } 181 }
180 ++phy->init_count; 182 ++phy->init_count;
181 183
@@ -232,6 +234,8 @@ int phy_power_on(struct phy *phy)
232 dev_err(&phy->dev, "phy poweron failed --> %d\n", ret); 234 dev_err(&phy->dev, "phy poweron failed --> %d\n", ret);
233 goto out; 235 goto out;
234 } 236 }
237 } else {
238 ret = 0; /* Override possible ret == -ENOTSUPP */
235 } 239 }
236 ++phy->power_count; 240 ++phy->power_count;
237 mutex_unlock(&phy->mutex); 241 mutex_unlock(&phy->mutex);
@@ -404,17 +408,11 @@ struct phy *phy_get(struct device *dev, const char *string)
404 index = of_property_match_string(dev->of_node, "phy-names", 408 index = of_property_match_string(dev->of_node, "phy-names",
405 string); 409 string);
406 phy = of_phy_get(dev, index); 410 phy = of_phy_get(dev, index);
407 if (IS_ERR(phy)) {
408 dev_err(dev, "unable to find phy\n");
409 return phy;
410 }
411 } else { 411 } else {
412 phy = phy_lookup(dev, string); 412 phy = phy_lookup(dev, string);
413 if (IS_ERR(phy)) {
414 dev_err(dev, "unable to find phy\n");
415 return phy;
416 }
417 } 413 }
414 if (IS_ERR(phy))
415 return phy;
418 416
419 if (!try_module_get(phy->ops->owner)) 417 if (!try_module_get(phy->ops->owner))
420 return ERR_PTR(-EPROBE_DEFER); 418 return ERR_PTR(-EPROBE_DEFER);