Commit 7d255ddb authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Neil Armstrong

drm/meson: encoder_cvbs: Fix refcount leak in meson_encoder_cvbs_init

of_graph_get_remote_node() returns remote device nodepointer with
refcount incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.

Fixes: 318ba02c ("drm/meson: encoder_cvbs: switch to bridge with ATTACH_NO_CONNECTOR")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Reviewed-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220601033927.47814-2-linmq006@gmail.com
parent da1efdb2
...@@ -238,6 +238,7 @@ int meson_encoder_cvbs_init(struct meson_drm *priv) ...@@ -238,6 +238,7 @@ int meson_encoder_cvbs_init(struct meson_drm *priv)
} }
meson_encoder_cvbs->next_bridge = of_drm_find_bridge(remote); meson_encoder_cvbs->next_bridge = of_drm_find_bridge(remote);
of_node_put(remote);
if (!meson_encoder_cvbs->next_bridge) { if (!meson_encoder_cvbs->next_bridge) {
dev_err(priv->dev, "Failed to find CVBS Connector bridge\n"); dev_err(priv->dev, "Failed to find CVBS Connector bridge\n");
return -EPROBE_DEFER; return -EPROBE_DEFER;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment