powercap/dtpm: Move the 'root' reset place
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Sun, 30 Jan 2022 21:02:07 +0000 (22:02 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 23 Feb 2022 18:45:45 +0000 (19:45 +0100)
commit4712a236db409d5ee5dccb8c7e57fe54d7d3ec66
treeceaed9850937f48a2aaeefcdf68945c9f274e478
parentc404c64d64bc31bebe8a2015103671f7cd282731
powercap/dtpm: Move the 'root' reset place

The 'root' node is checked everytime a dtpm node is destroyed.

When we reach the end of the hierarchy destruction function, we can
unconditionnaly set the 'root' node to NULL again.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20220130210210.549877-5-daniel.lezcano@linaro.org
drivers/powercap/dtpm.c