PM / OPP: Propagate the error returned by _find_opp_table()
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 21 Apr 2016 08:58:53 +0000 (14:28 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 Apr 2016 14:10:11 +0000 (16:10 +0200)
Don't send -EINVAL and propagate what's received from _find_opp_table().

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>
drivers/base/power/opp/cpu.c

index ba2bdbd932ef3c1ebaff47c6203bddb27fe9c03b..b7411a3cdcb180e4f497c4485b72fea4e84dfce8 100644 (file)
@@ -131,7 +131,7 @@ int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask)
 
        opp_table = _find_opp_table(cpu_dev);
        if (IS_ERR(opp_table)) {
-               ret = -EINVAL;
+               ret = PTR_ERR(opp_table);
                goto unlock;
        }