[PATCH] drm/meson: Fix remote device node leak in meson_encoder_dsi_probe()
Wentao Liang
vulab at iscas.ac.cn
Wed Sep 16 10:50:15 PDT 2026
The device node returned by of_graph_get_remote_node() is never
released. of_drm_find_and_get_bridge() only uses it as a lookup key and
takes its own reference on the bridge, so drop the node reference once
the lookup is done, as meson_encoder_cvbs_probe() already does.
Fixes: 42dcf15f901c ("drm/meson: add DSI encoder")
Cc: stable at vger.kernel.org
Signed-off-by: Wentao Liang <vulab at iscas.ac.cn>
---
drivers/gpu/drm/meson/meson_encoder_dsi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/meson/meson_encoder_dsi.c b/drivers/gpu/drm/meson/meson_encoder_dsi.c
index 5f2eeeaf93b8..4e1ebe617e49 100644
--- a/drivers/gpu/drm/meson/meson_encoder_dsi.c
+++ b/drivers/gpu/drm/meson/meson_encoder_dsi.c
@@ -120,6 +120,7 @@ int meson_encoder_dsi_probe(struct meson_drm *priv)
}
meson_encoder_dsi->bridge.next_bridge = of_drm_find_and_get_bridge(remote);
+ of_node_put(remote);
if (!meson_encoder_dsi->bridge.next_bridge)
return dev_err_probe(priv->dev, -EPROBE_DEFER,
"Failed to find DSI transceiver bridge\n");
--
2.34.1
More information about the linux-amlogic
mailing list