]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:11 +0000 (14:24 +0200)
commiteb6937f16b2aaf107fc0b8f150ce734cacb28565
tree2da0d1e462f4e57e7a2d16d7d78b7badf81add45
parent2d94f7980dca2a3a083f4a5b2e65b740373f4eae
video: fbdev: amba-clcd: Fix refcount leak bugs

[ Upstream commit 68bc7eaa681ce33af6c6e98d9b632c6deb578336 ]

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: a9af11529700 ("video: ARM CLCD: Add DT support")
Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/video/fbdev/amba-clcd.c