projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0aea2e4
)
powercap/dtpm: Fixup kfree for virtual node
author
Daniel Lezcano
<daniel.lezcano@linaro.org>
Sun, 30 Jan 2022 21:02:05 +0000
(22:02 +0100)
committer
Daniel Lezcano
<daniel.lezcano@linaro.org>
Wed, 23 Feb 2022 18:45:33 +0000
(19:45 +0100)
When the node is virtual there is no release function associated which
can free the memory.
Free the memory when no 'ops' exists.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link:
https://lore.kernel.org/r/20220130210210.549877-3-daniel.lezcano@linaro.org
drivers/powercap/dtpm.c
patch
|
blob
|
history
diff --git
a/drivers/powercap/dtpm.c
b/drivers/powercap/dtpm.c
index 0b0121c37a1b843e31f8836cbb6f7e1434a3b5df..7bddd25a67670f3392fe879fb93b1d935e1bb0d0 100644
(file)
--- a/
drivers/powercap/dtpm.c
+++ b/
drivers/powercap/dtpm.c
@@
-181,12
+181,12
@@
int dtpm_release_zone(struct powercap_zone *pcz)
if (dtpm->ops)
dtpm->ops->release(dtpm);
+ else
+ kfree(dtpm);
if (root == dtpm)
root = NULL;
- kfree(dtpm);
-
return 0;
}