aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2020-11-06 12:18:39 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2020-12-09 11:21:12 +0530
commit814568728373699907971f897b89d95736b0d880 (patch)
tree49e52adedd1dfd77ca33e67fbdcd9475502e7c79 /drivers/devfreq
parentcpufreq: qcom-cpufreq-nvmem: dev_pm_opp_put_*() accepts NULL argument (diff)
downloadlinux-dev-814568728373699907971f897b89d95736b0d880.tar.xz
linux-dev-814568728373699907971f897b89d95736b0d880.zip
PM / devfreq: exynos: dev_pm_opp_put_*() 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 check. Drop them. Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/exynos-bus.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index 1e684a448c9e..143fd58ec3dc 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -158,10 +158,8 @@ static void exynos_bus_exit(struct device *dev)
dev_pm_opp_of_remove_table(dev);
clk_disable_unprepare(bus->clk);
- if (bus->opp_table) {
- dev_pm_opp_put_regulators(bus->opp_table);
- bus->opp_table = NULL;
- }
+ dev_pm_opp_put_regulators(bus->opp_table);
+ bus->opp_table = NULL;
}
static void exynos_bus_passive_exit(struct device *dev)
@@ -444,10 +442,8 @@ err:
dev_pm_opp_of_remove_table(dev);
clk_disable_unprepare(bus->clk);
err_reg:
- if (!passive) {
- dev_pm_opp_put_regulators(bus->opp_table);
- bus->opp_table = NULL;
- }
+ dev_pm_opp_put_regulators(bus->opp_table);
+ bus->opp_table = NULL;
return ret;
}