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

From: Martin Blumenstingl
Date: Sun Jun 05 2022 - 18:07:20 EST


Hello,

thank you for working on this!

On Wed, Jun 1, 2022 at 5:40 AM Miaoqian Lin <linmq006@xxxxxxxxx> 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@xxxxxxxxx>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>

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