drm/lima: dev_pm_opp_put_*() accepts NULL argument
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 6 Nov 2020 06:48:39 +0000 (12:18 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 9 Dec 2020 05:51:12 +0000 (11:21 +0530)
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.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/gpu/drm/lima/lima_devfreq.c

index bbe0281..e7b7b8d 100644 (file)
@@ -110,15 +110,10 @@ void lima_devfreq_fini(struct lima_device *ldev)
                devfreq->opp_of_table_added = false;
        }
 
-       if (devfreq->regulators_opp_table) {
-               dev_pm_opp_put_regulators(devfreq->regulators_opp_table);
-               devfreq->regulators_opp_table = NULL;
-       }
-
-       if (devfreq->clkname_opp_table) {
-               dev_pm_opp_put_clkname(devfreq->clkname_opp_table);
-               devfreq->clkname_opp_table = NULL;
-       }
+       dev_pm_opp_put_regulators(devfreq->regulators_opp_table);
+       dev_pm_opp_put_clkname(devfreq->clkname_opp_table);
+       devfreq->regulators_opp_table = NULL;
+       devfreq->clkname_opp_table = NULL;
 }
 
 int lima_devfreq_init(struct lima_device *ldev)