exynos_dpi_parse_dt() acquires the remote panel node. The posted
display-timings fix releases it on that branch, but the panel lookup
path still retains it on success and failure, including deferred
probe. of_drm_find_panel() does not consume the node reference.

Put the node immediately after the lookup and clear the unused
pointer. This covers both lookup outcomes while leaving the
separate panel reference and its existing remove-time put unchanged.

Fixes: 14b6873a0198 ("drm/exynos: restore parallel output interface support")
Link: https://patchwork.kernel.org/series/1166158/
Signed-off-by: Yige Jiang <[email protected]>
---
Based on linux-next next-20261102 (2637bdec0535).
Compile-tested: arm64, GCC 14.2.0, W=1, CONFIG_OF_DYNAMIC=y.
COMPILE_TEST=y.
Baseline and patched target objects built from this exact base.
No full kernel/module-link, hardware or runtime test was performed.
AI assistance was used for analysis and patch preparation.

This is an incremental patch based on the following posted fixes:
  [PATCH 10/20] drm/exynos: dpi: Fix OF node leak in exynos_dpi_parse_dt()
  <[email protected]>

 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 92e8bbe9d35b..e98a9be0a705 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
@@ -243,6 +243,8 @@ struct drm_encoder *exynos_dpi_probe(struct device *dev)
 
        if (ctx->panel_node) {
                ctx->panel = of_drm_find_panel(ctx->panel_node);
+               of_node_put(ctx->panel_node);
+               ctx->panel_node = NULL;
                if (IS_ERR(ctx->panel))
                        return ERR_CAST(ctx->panel);
        }

base-commit: 2637bdec0535a2044cd830eba9a79363651d9043
prerequisite-patch-id: 8f90819fd9f71f55560dc3af57c5a0bad07bc568

Reply via email to