Commit a14d546f authored by Viresh Kumar's avatar Viresh Kumar Committed by Qiang Yu
Browse files

drm/lima: Unconditionally call dev_pm_opp_of_remove_table()



dev_pm_opp_of_remove_table() doesn't report any errors when it fails to
find the OPP table with error -ENODEV (i.e. OPP table not present for
the device). And we can call dev_pm_opp_of_remove_table()
unconditionally here.

Reviewed-by: default avatarQiang Yu <yuq825@gmail.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarQiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c995335d16d8b4b4ff47b1273869c33e14782b32.1603867405.git.viresh.kumar@linaro.org
parent cd434e74
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -100,10 +100,7 @@ void lima_devfreq_fini(struct lima_device *ldev)
		devfreq->devfreq = NULL;
	}

	if (devfreq->opp_of_table_added) {
	dev_pm_opp_of_remove_table(ldev->dev);
		devfreq->opp_of_table_added = false;
	}

	if (devfreq->regulators_opp_table) {
		dev_pm_opp_put_regulators(devfreq->regulators_opp_table);
@@ -157,7 +154,6 @@ int lima_devfreq_init(struct lima_device *ldev)
	ret = dev_pm_opp_of_add_table(dev);
	if (ret)
		goto err_fini;
	ldevfreq->opp_of_table_added = true;

	lima_devfreq_reset(ldevfreq);

+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ struct lima_devfreq {
	struct opp_table *clkname_opp_table;
	struct opp_table *regulators_opp_table;
	struct thermal_cooling_device *cooling;
	bool opp_of_table_added;

	ktime_t busy_time;
	ktime_t idle_time;