]> git.baikalelectronics.ru Git - kernel.git/commit
video: fbdev: amba-clcd: Fix refcount leak bugs
authorLiang He <windhl@126.com>
Tue, 19 Jul 2022 08:25:46 +0000 (16:25 +0800)
committerHelge Deller <deller@gmx.de>
Tue, 26 Jul 2022 06:56:22 +0000 (08:56 +0200)
commit38c9753d789b830759676cf6524330f25eb1f8ae
tree4376367d3a030a3622b523a2b3fa0dc6b71f3ab1
parent5f33282f4b228393129568c7bfdaee799ce410d5
video: fbdev: amba-clcd: Fix refcount leak bugs

In clcdfb_of_init_display(), we should call of_node_put() for the
references returned by of_graph_get_next_endpoint() and
of_graph_get_remote_port_parent() which have increased the refcount.

Besides, we should call of_node_put() both in fail path or when
the references are not used anymore.

Fixes: d0909ae9e452 ("video: ARM CLCD: Add DT support")
Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/amba-clcd.c