Skip to content

Commit

Permalink
opp: Fix early exit from dev_pm_opp_register_set_opp_helper()
Browse files Browse the repository at this point in the history
We returned earlier by mistake even when there were no failures. Fix it.

Fixes: dd461cd ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER")
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.com>
  • Loading branch information
Viresh Kumar committed Oct 27, 2020
1 parent 1f6620f commit 47efcbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/opp/core.c
Original file line number Diff line number Diff line change
@@ -1930,7 +1930,7 @@ struct opp_table *dev_pm_opp_register_set_opp_helper(struct device *dev,
return ERR_PTR(-EINVAL);

opp_table = dev_pm_opp_get_opp_table(dev);
if (!IS_ERR(opp_table))
if (IS_ERR(opp_table))
return opp_table;

/* This should be called before OPPs are initialized */

0 comments on commit 47efcbc

Please sign in to comment.