From: sashiko-bot@kernel.org
To: "Nickolay Goppen" <setotau@mainlining.org>
Cc: robh@kernel.org, dri-devel@lists.freedesktop.org,
conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/3] drivers: gpu: drm: panel: Add BOE NT51021 driver
Date: Fri, 11 Sep 2026 15:44:33 +0000 [thread overview]
Message-ID: <20260911154433.BD65B1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260911-qcom-novatek-nt51021-panels-v2-2-135e3190a7fb@mainlining.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Ignored return values from `devm_drm_panel_add()` and `devm_mipi_dsi_attach()` leading to silent probe failures.
--
commit d977b7bfeacd8104619cc818002d70a48f32aad3
Author: Nickolay Goppen <setotau@mainlining.org>
drivers: gpu: drm: panel: Add BOE NT51021 driver
Add driver for BOE NT51021-based 8-inch and 10-inch DSI video mode
panels used in Xiaomi Mi Pad 4 and Mi Pad 4 Plus (xiaomi-clover)
tablets.
> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt51021.c b/drivers/gpu/drm/panel/panel-novatek-nt51021.c
> new file mode 100644
> index 0000000000000..61dd283769a75
> --- /dev/null
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt51021.c
[ ... ]
> +static int nt51021_novatek_probe(struct mipi_dsi_device *dsi)
> +{
> + struct device *dev = &dsi->dev;
> + struct novatek_nt51021_desc *ctx;
> + int ret;
[ ... ]
> + ret = drm_panel_of_backlight(&ctx->panel);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to get backlight\n");
> +
> + devm_drm_panel_add(dev, &ctx->panel);
> +
> + ret = devm_mipi_dsi_attach(dev, dsi);
> +
> + return 0;
> +}
[Severity: High]
Does this code silently ignore initialization failures?
In nt51021_novatek_probe(), the return value of devm_drm_panel_add() is
discarded. Additionally, the return value of devm_mipi_dsi_attach() is saved
to the ret variable, but then the function unconditionally returns 0.
If either devm_drm_panel_add() or devm_mipi_dsi_attach() fails, the probe
function will incorrectly report success. Should the code check these return
values and propagate any errors?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260911-qcom-novatek-nt51021-panels-v2-0-135e3190a7fb@mainlining.org?part=2
next prev parent reply other threads:[~2026-09-11 15:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 15:37 [PATCH v2 0/3] Novatek NT51021 DSI panel IC driver Nickolay Goppen
2026-09-11 15:38 ` [PATCH v2 1/3] dt-bindings: display: panel: Add bindings for Novatek NT51021 Nickolay Goppen
2026-09-13 9:31 ` Krzysztof Kozlowski
2026-09-11 15:38 ` [PATCH v2 2/3] drivers: gpu: drm: panel: Add BOE NT51021 driver Nickolay Goppen
2026-09-11 15:44 ` sashiko-bot [this message]
2026-09-11 15:48 ` Nickolay Goppen
2026-09-11 15:38 ` [PATCH v2 3/3] MAINTAINERS: Add myself as a maintainer of NT51021 panel driver Nickolay Goppen
2026-09-12 2:58 ` [PATCH v2 0/3] Novatek NT51021 DSI panel IC driver Ryan Brue
2026-09-12 12:05 ` Nickolay Goppen
2026-09-12 18:19 ` Ryan Brue
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=20260911154433.BD65B1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=setotau@mainlining.org \
/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