diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-02 23:09:08 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-02 23:09:08 -0500 |
commit | 13df7977431e3b906a23bb75f29e0f40a8d73f87 (patch) | |
tree | bc2c78c3b816a65f90c31cccebdc15b38352c045 /drivers/phy/phy-core.c | |
parent | 6d8b3e1ad3d3815d9c87b8553493301e243af76a (diff) | |
parent | 0414855fdc4a40da05221fc6062cccbc0c30f169 (diff) |
Merge 3.14-rc5 into driver-core-next
We want the fixes in here.
Diffstat (limited to 'drivers/phy/phy-core.c')
-rw-r--r-- | drivers/phy/phy-core.c | 14 |
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); |