aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2017-01-02 04:10:58 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-01-27 05:49:09 -0500
commit04a86a84c42ca18f37ab446127dc619b41dd3b23 (patch)
tree3e05fac7e9c9df84c1f03d32a59b82373384151c
parent63a69ea4b88f37bda3bb13c4fb417a3218902022 (diff)
PM / OPP: Error out on failing to add static OPPs for v1 bindings
The code adding static OPPs for V2 bindings already does so. Make the V1 bindings specific code behave the same. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/base/power/opp/of.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/base/power/opp/of.c b/drivers/base/power/opp/of.c
index f8512ca2bf41..c8fe815774ff 100644
--- a/drivers/base/power/opp/of.c
+++ b/drivers/base/power/opp/of.c
@@ -433,7 +433,7 @@ static int _of_add_opp_table_v1(struct device *dev)
433{ 433{
434 const struct property *prop; 434 const struct property *prop;
435 const __be32 *val; 435 const __be32 *val;
436 int nr; 436 int nr, ret;
437 437
438 prop = of_find_property(dev->of_node, "operating-points", NULL); 438 prop = of_find_property(dev->of_node, "operating-points", NULL);
439 if (!prop) 439 if (!prop)
@@ -456,9 +456,13 @@ static int _of_add_opp_table_v1(struct device *dev)
456 unsigned long freq = be32_to_cpup(val++) * 1000; 456 unsigned long freq = be32_to_cpup(val++) * 1000;
457 unsigned long volt = be32_to_cpup(val++); 457 unsigned long volt = be32_to_cpup(val++);
458 458
459 if (_opp_add_v1(dev, freq, volt, false)) 459 ret = _opp_add_v1(dev, freq, volt, false);
460 dev_warn(dev, "%s: Failed to add OPP %ld\n", 460 if (ret) {
461 __func__, freq); 461 dev_err(dev, "%s: Failed to add OPP %ld (%d)\n",
462 __func__, freq, ret);
463 dev_pm_opp_of_remove_table(dev);
464 return ret;
465 }
462 nr -= 2; 466 nr -= 2;
463 } 467 }
464 468