Re: [PATCH v2 07/11] drm/bridge: lt9611: switch to of_drm_get_bridge_by_endpoint()

Gyeyoung Baek
2026-04-28T13:18:35Z

>
> @@ -1058,7 +1057,11 @@ static int lt9611_parse_dt(struct device *dev,
>
> lt9611->ac_mode = of_property_read_bool(dev->of_node, "lt,ac-mode");
>
> - return drm_of_find_panel_or_bridge(dev->of_node, 2, -1, NULL, &lt9611->next_bridge);
> + lt9611->bridge.next_bridge = of_drm_get_bridge_by_endpoint(dev->of_node, 2, -1);
> + if (IS_ERR(lt9611->bridge.next_bridge))
> + return PTR_ERR(lt9611->bridge.next_bridge);
> +
> + return 0;
> }

Hello Luca,
Could you take a look at this alternative?
------
struct drm_bridge *next_bridge =
of_drm_get_bridge_by_endpoint(dev->of_node, 2, -1);

if (IS_ERR(next_bridge))
return PTR_ERR(next_bridge);

lt9611->bridge.next_bridge = next_bridge;
return 0;
------

I think it reads a bit cleaner and avoids holding the ERR_PTR in the struct.

--
Thanks,
Gyeyoung