Fwd: New Defects reported by Coverity Scan for Das U-Boot
Tom Rini
trini at konsulko.com
Mon Mar 9 22:23:31 CET 2026
Hey all,
Unfortunately for such a small set of changes (rc3 to rc4) a lot of new
Coverity scan issues have popped up. Please let me know if these appear
to be real issues or something that we can mark as intentional / false
positive. Thanks!
---------- Forwarded message ---------
From: <scan-admin at coverity.com>
Date: Mon, Mar 9, 2026, 2:11 PM
Subject: New Defects reported by Coverity Scan for Das U-Boot
To: <tom.rini at gmail.com>
Hi,
Please find the latest report on new defect(s) introduced to *Das U-Boot*
found with Coverity Scan.
- *New Defects Found:* 4
- *Defects Shown:* Showing 4 of 4 defect(s)
Defect Details
** CID 644836: Error handling issues (CHECKED_RETURN)
/drivers/video/stm32/stm32_dsi.c: 497 in stm32_dsi_probe()
_____________________________________________________________________________________________
*** CID 644836: Error handling issues (CHECKED_RETURN)
/drivers/video/stm32/stm32_dsi.c: 497 in stm32_dsi_probe()
491 priv->hw_version = dsi_read(plat->base, DSI_VERSION) & VERSION;
492 if (priv->hw_version != HWVER_130 &&
493 priv->hw_version != HWVER_131) {
494 dev_err(dev, "DSI version 0x%x not supported\n", priv->hw_version);
495 dev_dbg(dev, "remove and unbind all DSI child\n");
496 device_chld_remove(dev, NULL, DM_REMOVE_NORMAL);
>>> CID 644836: Error handling issues (CHECKED_RETURN)
>>> Calling "device_chld_unbind" without checking return value (as is done elsewhere 6 out of 7 times).
497 device_chld_unbind(dev, NULL);
498 ret = -ENODEV;
499 goto err_clk;
500 }
501
502 return 0;
** CID 644835: (TAINTED_SCALAR)
/common/menu.c: 589 in bootmenu_loop()
/common/menu.c: 589 in bootmenu_loop()
_____________________________________________________________________________________________
*** CID 644835: (TAINTED_SCALAR)
/common/menu.c: 589 in bootmenu_loop()
583 c = cli_ch_process(cch, c);
584 }
585 }
586
587 key = bootmenu_conv_key(c);
588
>>> CID 644835: (TAINTED_SCALAR)
>>> Using tainted variable "(int)(unsigned char)c" as an index into an array "_ctype".
589 if (key == BKEY_NONE && isalnum(c)) {
590 key = BKEY_SHORTCUT;
591 cch->shortcut_key = bootmenu_conv_shortcut_key(menu, c);
592 }
593
594 return key;
/common/menu.c: 589 in bootmenu_loop()
583 c = cli_ch_process(cch, c);
584 }
585 }
586
587 key = bootmenu_conv_key(c);
588
>>> CID 644835: (TAINTED_SCALAR)
>>> Using tainted variable "(int)(unsigned char)c" as an index into an array "_ctype".
589 if (key == BKEY_NONE && isalnum(c)) {
590 key = BKEY_SHORTCUT;
591 cch->shortcut_key = bootmenu_conv_shortcut_key(menu, c);
592 }
593
594 return key;
** CID 644834: Error handling issues (CHECKED_RETURN)
/drivers/video/stm32/stm32_dsi.c: 496 in stm32_dsi_probe()
_____________________________________________________________________________________________
*** CID 644834: Error handling issues (CHECKED_RETURN)
/drivers/video/stm32/stm32_dsi.c: 496 in stm32_dsi_probe()
490 /* check hardware version */
491 priv->hw_version = dsi_read(plat->base, DSI_VERSION) & VERSION;
492 if (priv->hw_version != HWVER_130 &&
493 priv->hw_version != HWVER_131) {
494 dev_err(dev, "DSI version 0x%x not supported\n", priv->hw_version);
495 dev_dbg(dev, "remove and unbind all DSI child\n");
>>> CID 644834: Error handling issues (CHECKED_RETURN)
>>> Calling "device_chld_remove" without checking return value (as is done elsewhere 4 out of 5 times).
496 device_chld_remove(dev, NULL, DM_REMOVE_NORMAL);
497 device_chld_unbind(dev, NULL);
498 ret = -ENODEV;
499 goto err_clk;
500 }
501
** CID 644833: Memory - illegal accesses (NEGATIVE_RETURNS)
/common/menu.c: 589 in bootmenu_loop()
_____________________________________________________________________________________________
*** CID 644833: Memory - illegal accesses (NEGATIVE_RETURNS)
/common/menu.c: 589 in bootmenu_loop()
583 c = cli_ch_process(cch, c);
584 }
585 }
586
587 key = bootmenu_conv_key(c);
588
>>> CID 644833: Memory - illegal accesses (NEGATIVE_RETURNS)
>>> Using variable "c" as an index to array "_ctype".
589 if (key == BKEY_NONE && isalnum(c)) {
590 key = BKEY_SHORTCUT;
591 cch->shortcut_key = bootmenu_conv_shortcut_key(menu, c);
592 }
593
594 return key;
View Defects in Coverity Scan
<https://scan.coverity.com/projects/das-u-boot?tab=overview>
Best regards,
The Coverity Scan Admin Team
----- End forwarded message -----
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260309/2b732b6c/attachment.sig>
More information about the U-Boot
mailing list