powercap/drivers/dtpm: Fix root node initialization
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 24 Feb 2021 18:30:21 +0000 (19:30 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 1 Mar 2021 16:43:29 +0000 (17:43 +0100)
commitf3c141057976120148ca32d9d030a2256a5ffb7b
tree5c316e9163b3a3a94d6aa2885e5caeb648283c6c
parentfe07bfda2fb9cdef8a4d4008a409bb02f35f1bd8
powercap/drivers/dtpm: Fix root node initialization

The root node is not set to NULL when the dtpm root node is
removed. Consequently, it is not possible to create a new root
as it is already set.

Set the root node to NULL when the last node is removed.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/powercap/dtpm.c