mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: "p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"irogers@google.com" <irogers@google.com>,
	"simona@ffwll.ch" <simona@ffwll.ch>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"llvm@lists.linux.dev" <llvm@lists.linux.dev>,
	"elkin@google.com" <elkin@google.com>
Subject: Re: [PATCH] drm/mediatek: Initialize ret in mtk_drm_of_ddp_path_build()
Date: Fri, 27 Nov 2026 06:30:55 +0000	[thread overview]
Message-ID: <63e0255e4387c5be78892a0fd73baa53cc90427d.camel@mediatek.com> (raw)
In-Reply-To: <20261119171053.1537233-1-irogers@google.com>

On Thu, 2026-11-19 at 09:10 -0800, Ian Rogers wrote:
> of_graph_is_present() returns true when a port or ports node exists in
> Device Tree even if it has zero enabled endpoint children. In that
> case, for_each_endpoint_of_node() in mtk_drm_of_ddp_path_build()
> executes zero iterations and 'if (ret)' evaluates an uninitialized
> stack variable, aborting probe with stack garbage.
> 
> Initialize ret to 0.
> 
> Found via Clang -Wconditional-uninitialized on an x86_64 allyesconfig
> build. Verified by building drivers/gpu/drm/mediatek/mtk_drm_drv.o
> with LLVM=1 W=1 (-Werror) and -Wconditional-uninitialized; not
> runtime-tested on MediaTek SoC hardware.

Reviewed-by: CK Hu <ck.hu@mediatek.com>

> 
> Fixes: 4c932840db1d ("drm/mediatek: Implement OF graphs support for display paths")
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---


      reply	other threads:[~2026-11-27  6:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 17:10 Ian Rogers
2026-11-27  6:30 ` CK Hu (胡俊光) [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=63e0255e4387c5be78892a0fd73baa53cc90427d.camel@mediatek.com \
    --to=ck.hu@mediatek.com \
    --cc=airlied@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=elkin@google.com \
    --cc=irogers@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=matthias.bgg@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=simona@ffwll.ch \
    /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®