diff options
| -rw-r--r-- | drivers/phy/phy-core.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index 5f5b0f4be5be..b3555535a8c6 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c | |||
| @@ -404,17 +404,11 @@ struct phy *phy_get(struct device *dev, const char *string) | |||
| 404 | index = of_property_match_string(dev->of_node, "phy-names", | 404 | index = of_property_match_string(dev->of_node, "phy-names", |
| 405 | string); | 405 | string); |
| 406 | phy = of_phy_get(dev, index); | 406 | 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 { | 407 | } else { |
| 412 | phy = phy_lookup(dev, string); | 408 | phy = phy_lookup(dev, string); |
| 413 | if (IS_ERR(phy)) { | ||
| 414 | dev_err(dev, "unable to find phy\n"); | ||
| 415 | return phy; | ||
| 416 | } | ||
| 417 | } | 409 | } |
| 410 | if (IS_ERR(phy)) | ||
| 411 | return phy; | ||
| 418 | 412 | ||
| 419 | if (!try_module_get(phy->ops->owner)) | 413 | if (!try_module_get(phy->ops->owner)) |
| 420 | return ERR_PTR(-EPROBE_DEFER); | 414 | return ERR_PTR(-EPROBE_DEFER); |
