]> git.baikalelectronics.ru Git - kernel.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)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 11 Aug 2022 16:13:31 +0000 (18:13 +0200)
commita3a843743434876e0d1fc674af8ba29fd6b037be
tree7a9c9cae249aefac29a84623d6146cc8313f5482
parent2ceb538a525bb662df0a6b9e8b8d910f16c7b362
drm:pl111: Add of_node_put() when breaking out of for_each_available_child_of_node()

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: d7df0da3693a ("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
drivers/gpu/drm/pl111/pl111_versatile.c