projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe07bfd
)
powercap/drivers/dtpm: Fix root node initialization
author
Daniel Lezcano
<daniel.lezcano@linaro.org>
Wed, 24 Feb 2021 18:30:21 +0000
(19:30 +0100)
committer
Rafael J. Wysocki
<rafael.j.wysocki@intel.com>
Mon, 1 Mar 2021 16:43:29 +0000
(17:43 +0100)
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
patch
|
blob
|
history
diff --git
a/drivers/powercap/dtpm.c
b/drivers/powercap/dtpm.c
index
5a51cd3
..
c2185ec
100644
(file)
--- a/
drivers/powercap/dtpm.c
+++ b/
drivers/powercap/dtpm.c
@@
-207,6
+207,9
@@
int dtpm_release_zone(struct powercap_zone *pcz)
if (dtpm->ops)
dtpm->ops->release(dtpm);
+ if (root == dtpm)
+ root = NULL;
+
kfree(dtpm);
return 0;