Commit 6a4ae7f0 authored by Javier Carrasco's avatar Javier Carrasco Committed by Chun-Kuang Hu
Browse files

drm/mediatek: ovl_adaptor: Use scoped variant of for_each_child_of_node()



In order to avoid potential memory leaks if new error paths are added
without a call to of_node_put(), use for_each_child_of_node_scoped()
instead of for_each_child_of_node(). The former automatically decrements
the refcount when the child goes out of scope, which removes the need
for explicit calls to of_node_put().

Signed-off-by: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: default avatarCK Hu <ck.hu@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240624-mtk_disp_ovl_adaptor_scoped-v1-3-9fa1e074d881@gmail.com/


Signed-off-by: default avatarChun-Kuang Hu <chunkuang.hu@kernel.org>
parent 5beb6fba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment