Re: [PATCH v4 1/4] drm: renesas: rz-du: rzg2l_du_encoder: convert to of_drm_find_and_get_bridge()

From: Luca Ceresoli

Date: Thu Apr 09 2026 - 08:33:05 EST


Hi Laurent, Louis,

On Wed Apr 8, 2026 at 11:33 PM CEST, Laurent Pinchart wrote:
> On Wed, Apr 08, 2026 at 07:39:03PM +0200, Luca Ceresoli wrote:
>> On Wed Apr 8, 2026 at 5:44 PM CEST, Louis Chauvet wrote:
>>
>> >> @@ -83,10 +83,21 @@ int rzg2l_du_encoder_init(struct rzg2l_du_device *rcdu,
>> >>
>> >> bridge = devm_drm_panel_bridge_add_typed(rcdu->dev, panel,
>> >> DRM_MODE_CONNECTOR_DPI);
>> >> - if (IS_ERR(bridge))
>> >> - return PTR_ERR(bridge);
>> >> + if (IS_ERR(bridge)) {
>> >> + // Inhibit the cleanup action on an ERR_PTR
>> >> + ret = PTR_ERR(bridge);
>> >> + bridge = NULL;
>> >> + return ret;
>> >> + }
>> >
>> > Can't you use
>> > https://elixir.bootlin.com/linux/v6.19.11/source/include/linux/cleanup.h#L230?
>> >
>> > return PTR_ERR(no_free_ptr(bridge));
>>
>> Ah, nice cleanup indeed! However, being this patch already reviewed ans
>> tested, I'll postpone this cleanup to a later series.
>
> I think this modification is minor enough to keep the tags.

OK, thanks for sharing your opinion! I'm sending a v5 of this patch and
patch 3 with that change and keeping the review tags, and apply them in ~1w
unless there is new feedback suggesting otherwise.

Luca

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