diff options
author | Mike Turquette <mturquette@linaro.org> | 2014-02-25 07:21:29 +0100 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2014-02-25 07:21:29 +0100 |
commit | 10b7cdc0084c27a312e59e80420c6aac70c64753 (patch) | |
tree | ee891d6236bcd8dc988624839760aaa1846cf906 /drivers/phy/phy-core.c | |
parent | clk: Correct handling of NULL clk in __clk_{get, put} (diff) | |
parent | clk: shmobile: Fix typo in MSTP clock DT bindings (diff) | |
download | linux-10b7cdc0084c27a312e59e80420c6aac70c64753.tar.xz linux-10b7cdc0084c27a312e59e80420c6aac70c64753.zip |
Merge branch 'clocks/fixes/drivers' of git://linuxtv.org/pinchartl/fbdev into clk-fixes
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) dev_err(&phy->dev, "phy init failed --> %d\n", ret); goto out; } + } else { + ret = 0; /* Override possible ret == -ENOTSUPP */ } ++phy->init_count; @@ -232,6 +234,8 @@ int phy_power_on(struct phy *phy) dev_err(&phy->dev, "phy poweron failed --> %d\n", ret); goto out; } + } else { + ret = 0; /* Override possible ret == -ENOTSUPP */ } ++phy->power_count; mutex_unlock(&phy->mutex); @@ -404,17 +408,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); |