From: Osama Abdelkader <osama.abdelkader@gmail.com>
To: Luca Ceresoli <luca.ceresoli@bootlin.com>
Cc: Jagan Teki <jagan@amarulasolutions.com>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drm/bridge: chipone-icn6211: use devm_drm_bridge_add
Date: Thu, 23 Apr 2026 22:12:17 +0200 [thread overview]
Message-ID: <aep9ISaiV4WxiLey@osama> (raw)
In-Reply-To: <DI0E7J7AJB4N.O7NUKHIX3VX9@bootlin.com>
On Thu, Apr 23, 2026 at 10:31:27AM +0200, Luca Ceresoli wrote:
> On Tue Apr 14, 2026 at 8:05 PM CEST, Osama Abdelkader wrote:
> > Use devm_drm_bridge_add() so the bridge is released if probe fails after
> > registration, and drop drm_bridge_remove() from DSI remove.
> >
> > v2: devm_drm_bridge_add instead of drm_bridge_add + manual remove paths
> >
> > Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
> > ---
> > drivers/gpu/drm/bridge/chipone-icn6211.c | 17 +++++++----------
> > 1 file changed, 7 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/chipone-icn6211.c b/drivers/gpu/drm/bridge/chipone-icn6211.c
> > index 5bee10c64265..4bc98c45f65f 100644
> > --- a/drivers/gpu/drm/bridge/chipone-icn6211.c
> > +++ b/drivers/gpu/drm/bridge/chipone-icn6211.c
> > @@ -5,6 +5,7 @@
> > */
> >
> > #include <drm/drm_atomic_helper.h>
> > +#include <drm/drm_bridge.h>
> > #include <drm/drm_of.h>
> > #include <drm/drm_print.h>
> > #include <drm/drm_mipi_dsi.h>
> > @@ -730,12 +731,11 @@ static int chipone_dsi_probe(struct mipi_dsi_device *dsi)
> >
> > mipi_dsi_set_drvdata(dsi, icn);
> >
> > - drm_bridge_add(&icn->bridge);
> > -
> > - ret = chipone_dsi_attach(icn);
> > + ret = devm_drm_bridge_add(dev, &icn->bridge);
> > if (ret)
> > - drm_bridge_remove(&icn->bridge);
> > + return ret;
> >
> > + ret = chipone_dsi_attach(icn);
> > return ret;
> > }
>
> This patch is doing two different things. This one is a code improvement...
>
> > @@ -758,20 +758,17 @@ static int chipone_i2c_probe(struct i2c_client *client)
> > dev_set_drvdata(dev, icn);
> > i2c_set_clientdata(client, icn);
> >
> > - drm_bridge_add(&icn->bridge);
> > + ret = devm_drm_bridge_add(dev, &icn->bridge);
> > + if (ret)
> > + return ret;
> >
> > ret = chipone_dsi_host_attach(icn);
> > - if (ret)
> > - drm_bridge_remove(&icn->bridge);
> > return ret;
> > }
>
> ...and this one is a bigfix. So they should be different patches, the fix
> having Fixes + Cc stable (with fixes being before other patches in the
> series).
>
Thanks for the review, done in v3.
Best regards,
Osama
> Luca
>
> --
> Luca Ceresoli, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
prev parent reply other threads:[~2026-04-23 20:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 18:05 [PATCH v2] drm/bridge: chipone-icn6211: use devm_drm_bridge_add Osama Abdelkader
2026-04-23 8:31 ` Luca Ceresoli
2026-04-23 20:12 ` Osama Abdelkader [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aep9ISaiV4WxiLey@osama \
--to=osama.abdelkader@gmail.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox