提交 9ad14c00 编写于 作者: V Viresh Kumar 提交者: Rafael J. Wysocki

PM / Domain: Return 0 on error from of_genpd_opp_to_performance_state()

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: 6e41766a "PM / Domain: Implement of_genpd_opp_to_performance_state()"
Reported-by: NRajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 e008690e
......@@ -2431,7 +2431,8 @@ unsigned int of_genpd_opp_to_performance_state(struct device *dev,
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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册