Commit e297bc3c authored by Liang He's avatar Liang He Committed by Zheng Zengkai
Browse files

video: fbdev: amba-clcd: Fix refcount leak bugs

stable inclusion
from stable-v5.10.137
commit da276dc288bf838ea0fd778b5441ec0f601c69f7
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=da276dc288bf838ea0fd778b5441ec0f601c69f7



--------------------------------

[ Upstream commit 26c2b7d9 ]

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: d10715be ("video: ARM CLCD: Add DT support")
Signed-off-by: default avatarLiang He <windhl@126.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent db7b7eeb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment