11.09.2026 18:44, [email protected] wrote:
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 <[email protected]>
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?
Didn't notice that, thanks
--
Best regards,
Nickolay