From: Myeonghun Pak <mhun512@gmail.com>
To: 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,
Myeonghun Pak <mhun512@gmail.com>,
stable@vger.kernel.org, Ijae Kim <ae878000@gmail.com>
Subject: [PATCH 1/2] drm/panel: boe-bf060y8m-aj0: use devm_drm_panel_add()
Date: Mon, 25 May 2026 01:36:32 +0900 [thread overview]
Message-ID: <f7407c121909b6da415d4b91f62669ea250a42de.1779640137.git.mhun512@gmail.com> (raw)
In-Reply-To: <cover.1779640137.git.mhun512@gmail.com>
boe_bf060y8m_aj0_probe() adds the panel before attaching the DSI
device. If mipi_dsi_attach() fails, probe returns with the panel still
registered.
drm-misc-next has devm_drm_panel_add(), so use it to register the panel
with devres-managed cleanup. This removes the need for open-coded
drm_panel_remove() handling on later probe failures and on the remove
path.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: a19125a28112 ("drm/panel: Add BOE BF060Y8M-AJ0 5.99" AMOLED panel driver")
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-boe-bf060y8m-aj0.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
index 84c21c62a4..a6d765b402 100644
--- a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
+++ b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
@@ -357,7 +357,9 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(dev, PTR_ERR(boe->panel.backlight),
"Failed to create backlight\n");
- drm_panel_add(&boe->panel);
+ ret = devm_drm_panel_add(dev, &boe->panel);
+ if (ret)
+ return ret;
ret = mipi_dsi_attach(dsi);
if (ret < 0) {
@@ -376,8 +378,6 @@ static void boe_bf060y8m_aj0_remove(struct mipi_dsi_device *dsi)
ret = mipi_dsi_detach(dsi);
if (ret < 0)
dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
-
- drm_panel_remove(&boe->panel);
}
static const struct of_device_id boe_bf060y8m_aj0_of_match[] = {
--
2.47.1
next prev parent reply other threads:[~2026-05-24 16:37 UTC|newest]
Thread overview: 6+ 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 ` Myeonghun Pak [this message]
2026-05-25 6:58 ` Claude review: drm/panel: boe-bf060y8m-aj0: use devm_drm_panel_add() Claude Code Review Bot
2026-05-24 16:36 ` [PATCH 2/2] drm/panel: novatek-nt36523: " Myeonghun Pak
2026-05-25 6:58 ` Claude review: " Claude Code Review Bot
2026-05-25 6:58 ` Claude review: drm/panel: use devm_drm_panel_add() in more drivers Claude Code Review Bot
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=f7407c121909b6da415d4b91f62669ea250a42de.1779640137.git.mhun512@gmail.com \
--to=mhun512@gmail.com \
--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=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