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: [email protected]
Signed-off-by: Wentao Liang <[email protected]>
---
 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

Reply via email to