]> git.baikalelectronics.ru Git - kernel.git/commit
PM / devfreq: exynos-ppmu: Fix refcount leak in of_get_devfreq_events
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 26 May 2022 08:28:56 +0000 (12:28 +0400)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 29 Jun 2022 20:11:17 +0000 (05:11 +0900)
commita3b1a00c981738ff3e2830dd54dacd321beee044
tree440c496a612fc3d9b284d731c6ff2c4adf2e6132
parent0888ed1a450f276e5aa8b8701c4f61b1d4df1397
PM / devfreq: exynos-ppmu: Fix refcount leak in of_get_devfreq_events

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: e35bee0f9278 ("PM / devfreq: event: Add devfreq_event class")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/devfreq/event/exynos-ppmu.c