diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2022-06-01 05:39:26 +0200 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2022-06-07 14:25:16 +0200 |
commit | 7d255ddbbf679aa47e041cbf68520fd985ed2279 (patch) | |
tree | 66bb523606ffbc67ca784c751ffcaff7736d7f89 | |
parent | drm/mgag200: Store positions of I2C data and clock bits in device info (diff) | |
download | linux-7d255ddbbf679aa47e041cbf68520fd985ed2279.tar.xz linux-7d255ddbbf679aa47e041cbf68520fd985ed2279.zip |
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: 318ba02cd8a8 ("drm/meson: encoder_cvbs: switch to bridge with ATTACH_NO_CONNECTOR")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220601033927.47814-2-linmq006@gmail.com
-rw-r--r-- | drivers/gpu/drm/meson/meson_encoder_cvbs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/meson/meson_encoder_cvbs.c b/drivers/gpu/drm/meson/meson_encoder_cvbs.c index fd8db97ba8ba..8110a6e39320 100644 --- a/drivers/gpu/drm/meson/meson_encoder_cvbs.c +++ b/drivers/gpu/drm/meson/meson_encoder_cvbs.c @@ -238,6 +238,7 @@ int meson_encoder_cvbs_init(struct meson_drm *priv) } meson_encoder_cvbs->next_bridge = of_drm_find_bridge(remote); + of_node_put(remote); if (!meson_encoder_cvbs->next_bridge) { dev_err(priv->dev, "Failed to find CVBS Connector bridge\n"); return -EPROBE_DEFER; |