summaryrefslogtreecommitdiff
path: root/drivers/opp/core.c
diff options
context:
space:
mode:
authorLiang He <windhl@126.com>2022-07-18 21:36:32 +0800
committerViresh Kumar <viresh.kumar@linaro.org>2022-07-19 11:07:02 +0530
commit3466ea2cd6b66e4647a9af2381c0d0cd3d579354 (patch)
tree1e673682efbb6b56767bc25de157eea3553f18b4 /drivers/opp/core.c
parentce736cf71b5ab8ad9b741dc7a4a07e41c27d1421 (diff)
OPP: Don't drop opp->np reference while it is still in use
The struct dev_pm_opp contains a reference of the DT node, opp->np, throughout its lifetime. We should increase the refcount for the same from _opp_add_static_v2(), and drop it while removing the OPP finally. Signed-off-by: Liang He <windhl@126.com> [ Viresh: Updated subject / commit log, create _of_clear_opp() and drop reference from it] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp/core.c')
-rw-r--r--drivers/opp/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 4f4a285886fa..77d1ba3a4154 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -1553,7 +1553,7 @@ static void _opp_kref_release(struct kref *kref)
* frequency/voltage list.
*/
blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_REMOVE, opp);
- _of_opp_free_required_opps(opp_table, opp);
+ _of_clear_opp(opp_table, opp);
opp_debug_remove_one(opp);
kfree(opp);
}