cpufreq: dt: Print error on failing to mark OPPs as shared
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 2 Sep 2015 09:06:49 +0000 (14:36 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 3 Sep 2015 00:46:09 +0000 (02:46 +0200)
We need to explicitly mark OPPs as shared, when they are not defined
with OPP-v2 bindings. This operation can potentially fail, and in that
case we should at least print an error message.

Fixes: 2e02d8723edf ("cpufreq: dt: Add support for operating-points-v2 bindings")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq-dt.c

index 8c38b5192baaffd8123d839a024c1b59482f61a3..b1131cf89757e62d51015d7bbc2356c23ae98c1a 100644 (file)
@@ -260,7 +260,10 @@ static int cpufreq_init(struct cpufreq_policy *policy)
                 * OPP tables are initialized only for policy->cpu, do it for
                 * others as well.
                 */
-               set_cpus_sharing_opps(cpu_dev, policy->cpus);
+               ret = set_cpus_sharing_opps(cpu_dev, policy->cpus);
+               if (ret)
+                       dev_err(cpu_dev, "%s: failed to mark OPPs as shared: %d\n",
+                               __func__, ret);
 
                of_property_read_u32(np, "clock-latency", &transition_latency);
        } else {