[PATCH 10/20] drm/exynos: dpi: Fix OF node leak in exynos_dpi_parse_dt()

Wentao Liang vulab at iscas.ac.cn
Wed Sep 16 00:20:12 PDT 2026


In exynos_dpi_parse_dt(), ctx->panel_node is obtained using
of_graph_get_remote_node(). However, when "display-timings" child node
is present, the driver uses display timings directly and ignores the
panel node without releasing the acquired reference count.

Call of_node_put() on ctx->panel_node and set it to NULL when
"display-timings" is present to prevent reference leaks.

Fixes: 86418f90a4c1 ("drm: convert drivers to use of_graph_get_remote_node")
Cc: stable at vger.kernel.org
Signed-off-by: Wentao Liang <vulab at iscas.ac.cn>
---
 drivers/gpu/drm/exynos/exynos_drm_dpi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
index 0dc36df6ada3..0b64d1031951 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
@@ -168,6 +168,8 @@ static int exynos_dpi_parse_dt(struct exynos_dpi *ctx)
 		int ret;
 
 		of_node_put(np);
+		of_node_put(ctx->panel_node);
+		ctx->panel_node = NULL;
 
 		vm = devm_kzalloc(dev, sizeof(*ctx->vm), GFP_KERNEL);
 		if (!vm)
-- 
2.34.1




More information about the linux-arm-kernel mailing list