summaryrefslogtreecommitdiff
path: root/drivers/base/power/domain.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2018-05-24 16:02:40 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-05-24 19:08:14 +0200
commit9ad14c001651955ebc390a5bb56858b0ee27ec2d (patch)
tree1f179a0171b24a3c84ab89c388a48fff09877d91 /drivers/base/power/domain.c
parente008690e4e921d1acf3c3a2397efe460b5abee01 (diff)
downloadlwn-9ad14c001651955ebc390a5bb56858b0ee27ec2d.tar.gz
lwn-9ad14c001651955ebc390a5bb56858b0ee27ec2d.zip
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: 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>
Diffstat (limited to 'drivers/base/power/domain.c')
-rw-r--r--drivers/base/power/domain.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index da6c8860c72e..71a1cc79fbaa 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -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;
}