]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mcde: Fix refcount leak in mcde_dsi_bind
authorMiaoqian Lin <linmq006@gmail.com>
Wed, 25 May 2022 11:54:11 +0000 (15:54 +0400)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 27 Jun 2022 07:58:41 +0000 (09:58 +0200)
commita8837dfec18b75486ca7f8bee0702b2c61df0e1e
tree1bb107f9835d20020828fb6194ad40b6dc369921
parent6e2f501c782dfe87c4ce4a1b586d5d02aa866da2
drm/mcde: Fix refcount leak in mcde_dsi_bind

Every iteration of for_each_available_child_of_node() decrements
the reference counter of the previous node. There is no decrement
when break out from the loop and results in refcount leak.
Add missing of_node_put() to fix this.

Fixes: b54b2b95e2dd ("drm/mcde: Add new driver for ST-Ericsson MCDE")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220525115411.65455-1-linmq006@gmail.com
drivers/gpu/drm/mcde/mcde_dsi.c