of_genpd_opp_to_performance_state() should return 0 on errors, as its
doc comment describes. While it follows that mostly, it returns a
negative error number on one of the failures.
Fix that.
Fixes: 6e41766a6a50 "PM / Domain: Implement of_genpd_opp_to_performance_state()"
Reported-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
opp = of_dev_pm_opp_find_required_opp(&genpd->dev, opp_node);
if (IS_ERR(opp)) {
- state = PTR_ERR(opp);
+ dev_err(dev, "Failed to find required OPP: %ld\n",
+ PTR_ERR(opp));
goto unlock;
}