Commit 01121e3
PM / devfreq: exynos-ppmu: Fix refcount leak in of_get_devfreq_events
commit f44b799 upstream.
of_get_child_by_name() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
This function only calls of_node_put() in normal path,
missing it in error paths.
Add missing of_node_put() to avoid refcount leak.
Fixes: f262f28 ("PM / devfreq: event: Add devfreq_event class")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 7cf7ed8 commit 01121e3
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
| 517 | + | |
| 518 | + | |
518 | 519 | | |
| 520 | + | |
519 | 521 | | |
520 | 522 | | |
521 | 523 | | |
522 | 524 | | |
523 | 525 | | |
524 | | - | |
| 526 | + | |
| 527 | + | |
525 | 528 | | |
| 529 | + | |
526 | 530 | | |
527 | 531 | | |
528 | 532 | | |
| |||
0 commit comments