mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: Albert Esteve <aesteve@redhat.com>
Cc: tomi.valkeinen@ideasonboard.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
	luca.ceresoli@bootlin.com, louis.chauvet@bootlin.com,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/omap: dss: simplify omapdss_device_init_output
Date: Thu, 19 Nov 2026 10:17:34 +0100	[thread overview]
Message-ID: <20261119101734.2bb8bae9@kemnade.info> (raw)
In-Reply-To: <CADSE00+-9Br_eVWRc=+i+OnthqZYfaMZ57Gxp5fXmqFXrMqf3A@mail.gmail.com>

On Thu, 19 Nov 2026 09:32:11 +0100
Albert Esteve <aesteve@redhat.com> wrote:

> On Tue, Nov 17, 2026 at 7:40 PM Andreas Kemnade <andreas@kemnade.info> wrote:
> >
> > During reviewing of a regression fix is that function, questionable
> > possibly unbalanced drm_bridge_put/get came to light. Sashiko
> > review pointed out that of_drm_get_bridge_by_endpoint() does not return
> > NULL, so the questionable code is simply unreachable and therefore does
> > at least not harm. Remove the dead code.
> >
> > Suggested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > ---
> >  drivers/gpu/drm/omapdrm/dss/output.c | 10 ----------
> >  1 file changed, 10 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c
> > index b5cef5093a883..cbb9b2f1a2133 100644
> > --- a/drivers/gpu/drm/omapdrm/dss/output.c
> > +++ b/drivers/gpu/drm/omapdrm/dss/output.c
> > @@ -20,7 +20,6 @@ int omapdss_device_init_output(struct omap_dss_device *out,
> >                                struct drm_bridge *local_bridge)
> >  {
> >         struct drm_bridge *bridge;
> > -       int ret;
> >
> >         bridge = of_drm_get_bridge_by_endpoint(out->dev->of_node, out->of_port, 0);
> >         if (IS_ERR(bridge)) {
> > @@ -34,20 +33,11 @@ int omapdss_device_init_output(struct omap_dss_device *out,
> >         out->bridge = bridge;
> >
> >         if (local_bridge) {
> > -               if (!out->bridge) {
> > -                       ret = -EPROBE_DEFER;
> > -                       goto error;
> > -               }
> > -
> >                 out->next_bridge = out->bridge;
> >                 out->bridge = drm_bridge_get(local_bridge);
> >         }
> >
> >         return 0;
> > -
> > -error:
> > -       omapdss_device_cleanup_output(out);
> > -       return ret;
> >  }  
> 
> This looks correct, it is dead code. But removing it makes the return
> value meaningless (every path returns 0), so it may make sense to make
> omapdss_device_init_output() void?
> 
No, not every patch returns 0.

Regards,
Andreas

  reply	other threads:[~2026-11-19  9:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 18:40 Andreas Kemnade
2026-11-19  8:32 ` Albert Esteve
2026-11-19  9:17   ` Andreas Kemnade [this message]
2026-11-19  9:32     ` Albert Esteve

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=20261119101734.2bb8bae9@kemnade.info \
    --to=andreas@kemnade.info \
    --cc=aesteve@redhat.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=louis.chauvet@bootlin.com \
    --cc=luca.ceresoli@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tomi.valkeinen@ideasonboard.com \
    --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

all inboxes | Powered by JetHome®