aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/opp/core.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2020-09-11 14:56:18 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2020-09-16 14:02:34 +0530
commita5663c9b1e31c00e0bdfaf4d92eb51358fc3950f (patch)
treef00652e9807ceca56e4926ada69b10d6ac435084 /drivers/opp/core.c
parentopp: Prevent memory leak in dev_pm_opp_attach_genpd() (diff)
downloadlinux-dev-a5663c9b1e31c00e0bdfaf4d92eb51358fc3950f.tar.xz
linux-dev-a5663c9b1e31c00e0bdfaf4d92eb51358fc3950f.zip
opp: Allow opp-level to be set to 0
The DT bindings don't put such a constraint, nor should the kernel. It is perfectly fine for opp-level to be set to 0, if we need to put the performance state votes for a domain for a particular OPP. Reported-by: Stephan Gerhold <stephan@gerhold.net> Tested-by: Stephan Gerhold <stephan@gerhold.net> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp/core.c')
-rw-r--r--drivers/opp/core.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index e65174725a4d..8d047300d001 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2109,9 +2109,6 @@ int dev_pm_opp_xlate_performance_state(struct opp_table *src_table,
int dest_pstate = -EINVAL;
int i;
- if (!pstate)
- return 0;
-
/*
* Normally the src_table will have the "required_opps" property set to
* point to one of the OPPs in the dst_table, but in some cases the