[PATCH v2 2/2] drm/meson: encoder_hdmi: Fix refcount leak in meson_encoder_hdmi_init

Martin Blumenstingl martin.blumenstingl at googlemail.com
Sun Jun 5 15:07:00 PDT 2022


Hello,

thank you for working on this!

On Wed, Jun 1, 2022 at 5:40 AM Miaoqian Lin <linmq006 at gmail.com> wrote:
>
> 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: e67f6037ae1b ("drm/meson: split out encoder from meson_dw_hdmi")
> Signed-off-by: Miaoqian Lin <linmq006 at gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>

Note to self: at first I thought the following code needs to be changed as well:
  notifier = cec_notifier_conn_register(&pdev->dev, NULL, &conn_info);
  if (!notifier)
    return -ENOMEM;
But a few lines before this we already have:
of_node_put(remote);
Meaning: this patch is fine as is.


Best regards,
Martin



More information about the linux-arm-kernel mailing list