PM / devfreq: exynos-ppmu: Fix refcount leak in of_get_devfreq_events
stable inclusion from stable-v5.10.129 commit e65027fdebbacd40595e96ef7b5d2418f71bddf2 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5YNDQ Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e65027fdebbacd40595e96ef7b5d2418f71bddf2 -------------------------------- commit f44b7996 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: f262f28c ("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> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com> Reviewed-by:
Wei Li <liwei391@huawei.com>
Loading
Please sign in to comment