]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm:pl111: Add of_node_put() when breaking out of for_each_available_child_of_node()
authorLiang He <windhl@126.com>
Mon, 11 Jul 2022 13:15:50 +0000 (21:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2022 07:57:17 +0000 (09:57 +0200)
commita656ff69fe13d1792b92f633e8c0d2362c0ca5ee
tree2d2e0890c502a1949eaf0b31c94fb73b87791afe
parent79878d6829b53c392c20f25208ba8d8a5ce4fbd4
drm:pl111: Add of_node_put() when breaking out of for_each_available_child_of_node()

[ Upstream commit e0686dc6f2252e009c455fe99e2ce9d62a60eb47 ]

The reference 'child' in the iteration of for_each_available_child_of_node()
is only escaped out into a local variable which is only used to check
its value. So we still need to the of_node_put() when breaking of the
for_each_available_child_of_node() which will automatically increase
and decrease the refcount.

Fixes: ca454bd42dc2 ("drm/pl111: Support the Versatile Express")
Signed-off-by: Liang He <windhl@126.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220711131550.361350-1-windhl@126.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/pl111/pl111_versatile.c