Re: [PATCH] drm/exynos: hdmi: put bridge reference on probe failure

From: Luca Ceresoli

Date: Thu Nov 26 2026 - 08:37:28 EST


On Thu Nov 26, 2026 at 6:58 AM CET, Yige Jiang wrote:
> hdmi_resources_init() ends with hdmi_bridge_init(), which takes a
> reference on the next bridge with of_drm_find_and_get_bridge(). That
> reference is only dropped in hdmi_remove(). When hdmi_probe() fails
> after hdmi_resources_init(), including the -EPROBE_DEFER returns for
> the DDC adapter, the PHY and the syscon lookups, the reference is
> leaked, once per failed probe attempt.
>
> The sashiko AI review bot pointed this out on dri-devel on 2026-07-16,
> in its review of an unrelated exynos_hdmi patch.
>
> Drop the reference at the end of the probe error path and route the two
> early returns after hdmi_resources_init() through it. drm_bridge_put()
> ignores NULL, which covers boards without a bridge on port 1.
>
> Fixes: 2db0d298f22d ("drm/exynos: hdmi: convert to of_drm_find_and_get_bridge()")
> Cc: stable@xxxxxxxxxxxxxxx
> Link: https://lore.kernel.org/r/20260716132919.A3EA81F000E9@xxxxxxxxxxxxxxx
> Signed-off-by: Yige Jiang <yigejiang86@xxxxxxxxx>

Reviewed-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com