From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Myeonghun Pak <mhun512@gmail.com>,
Neil Armstrong <neil.armstrong@linaro.org>
Cc: Jianhua Lu <lujianhua000@gmail.com>,
Jessica Zhang <jesszhan0024@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,
stable@vger.kernel.org, Ijae Kim <ae878000@gmail.com>
Subject: Re: [PATCH 2/2] drm/panel: novatek-nt36523: use devm_drm_panel_add()
Date: Mon, 25 May 2026 12:14:18 +0200 [thread overview]
Message-ID: <f90481df-c68e-4c3c-be50-ad4e5e97d19b@wanadoo.fr> (raw)
In-Reply-To: <c6fe4a162692b4df5525353dbdac5b88eda91a79.1779640137.git.mhun512@gmail.com>
Le 24/05/2026 à 18:36, Myeonghun Pak a écrit :
> nt36523_probe() adds the DRM panel before attaching the DSI devices. If
> one of the devm_mipi_dsi_attach() calls fails, probe returns with the
> panel still registered.
>
> This issue was identified during our ongoing static-analysis research while
> reviewing kernel code.
>
> Fixes: 0993234a0045 ("drm/panel: Add driver for Novatek NT36523")
> Cc: stable@vger.kernel.org
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
> ---
> drivers/gpu/drm/panel/panel-novatek-nt36523.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36523.c b/drivers/gpu/drm/panel/panel-novatek-nt36523.c
> index 226d91daf8..f6592b01df 100644
> --- a/drivers/gpu/drm/panel/panel-novatek-nt36523.c
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt36523.c
> @@ -1047,13 +1047,6 @@ static int nt36523_unprepare(struct drm_panel *panel)
> return 0;
> }
>
> -static void nt36523_remove(struct mipi_dsi_device *dsi)
> -{
> - struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi);
Hi,
Not looked in details, but the:
mipi_dsi_set_drvdata(dsi, pinfo);
in the probe now looks useless.
CJ
> -
> - drm_panel_remove(&pinfo->panel);
> -}
> -
> static int nt36523_get_modes(struct drm_panel *panel,
> struct drm_connector *connector)
> {
> @@ -1225,7 +1218,9 @@ static int nt36523_probe(struct mipi_dsi_device *dsi)
> return dev_err_probe(dev, ret, "Failed to get backlight\n");
> }
>
> - drm_panel_add(&pinfo->panel);
> + ret = devm_drm_panel_add(dev, &pinfo->panel);
> + if (ret)
> + return ret;
>
> for (i = 0; i < DSI_NUM_MIN + pinfo->desc->is_dual_dsi; i++) {
> pinfo->dsi[i]->lanes = pinfo->desc->lanes;
> @@ -1259,7 +1254,6 @@ MODULE_DEVICE_TABLE(of, nt36523_of_match);
>
> static struct mipi_dsi_driver nt36523_driver = {
> .probe = nt36523_probe,
> - .remove = nt36523_remove,
> .driver = {
> .name = "panel-novatek-nt36523",
> .of_match_table = nt36523_of_match,
prev parent reply other threads:[~2026-05-25 10:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-24 16:36 [PATCH 0/2] drm/panel: use devm_drm_panel_add() in more drivers Myeonghun Pak
2026-05-24 16:36 ` [PATCH 1/2] drm/panel: boe-bf060y8m-aj0: use devm_drm_panel_add() Myeonghun Pak
2026-05-24 16:36 ` [PATCH 2/2] drm/panel: novatek-nt36523: " Myeonghun Pak
2026-05-25 10:14 ` Christophe JAILLET [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=f90481df-c68e-4c3c-be50-ad4e5e97d19b@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=ae878000@gmail.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lujianhua000@gmail.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mhun512@gmail.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--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®