diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2020-11-06 09:48:39 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2020-12-09 08:51:11 +0300 |
commit | 5f6ffb8d8f8fdf672cbc4f27888ce075df13d49c (patch) | |
tree | 6828916c293e8cdc63cc58132c49a2074464942a /drivers/cpufreq/cpufreq-dt.c | |
parent | c7bf8758c955e6272c0f4b2411d7a85abce8fafe (diff) | |
download | linux-5f6ffb8d8f8fdf672cbc4f27888ce075df13d49c.tar.xz |
cpufreq: dt: dev_pm_opp_put_regulators() accepts NULL argument
The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so
there is no need for us to carry the extra checks. Drop them.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/cpufreq-dt.c')
-rw-r--r-- | drivers/cpufreq/cpufreq-dt.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index 5aa3d4e3140d..ad4234518ef6 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -291,8 +291,7 @@ static int dt_cpufreq_early_init(struct device *dev, int cpu) out: if (priv->have_static_opps) dev_pm_opp_of_cpumask_remove_table(priv->cpus); - if (priv->opp_table) - dev_pm_opp_put_regulators(priv->opp_table); + dev_pm_opp_put_regulators(priv->opp_table); free_cpumask: free_cpumask_var(priv->cpus); return ret; @@ -306,8 +305,7 @@ static void dt_cpufreq_release(void) dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &priv->freq_table); if (priv->have_static_opps) dev_pm_opp_of_cpumask_remove_table(priv->cpus); - if (priv->opp_table) - dev_pm_opp_put_regulators(priv->opp_table); + dev_pm_opp_put_regulators(priv->opp_table); free_cpumask_var(priv->cpus); list_del(&priv->node); } |