[PATCH v2 2/6] drm/meson/dw-hdmi: convert to of_drm_find_and_get_bridge()
Martin Blumenstingl
martin.blumenstingl at googlemail.com
Mon Jan 12 14:21:56 PST 2026
Hi Luca,
On Fri, Jan 9, 2026 at 11:03 AM Luca Ceresoli <luca.ceresoli at bootlin.com> wrote:
>
> of_drm_find_bridge() is deprecated. Move to its replacement
> of_drm_find_and_get_bridge() which gets a bridge reference, and ensure it
> is put when done.
>
> dw_hdmi->bridge is used only in dw_hdmi_top_thread_irq(), so in order to
> avoid potential use-after-free ensure the irq is freed before putting the
> dw_hdmi->bridge reference.
>
> Acked-by: Maxime Ripard <mripard at kernel.org>
> Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
[...]
> @@ -789,8 +789,12 @@ static void meson_dw_hdmi_unbind(struct device *dev, struct device *master,
> void *data)
> {
> struct meson_dw_hdmi *meson_dw_hdmi = dev_get_drvdata(dev);
> + struct platform_device *pdev = to_platform_device(dev);
> + int irq = platform_get_irq(pdev, 0);
>
> + devm_free_irq(dev, irq, meson_dw_hdmi);
I have one question (so I can understand things better):
is there a particular reason why you went with free'ing the IRQ
instead of "just" masking it (so the hardware won't fire anymore of
those IRQs)?
Best regards,
Martin
More information about the linux-arm-kernel
mailing list