[PATCH v1] led: fix coverity scan error

Tom Rini trini at konsulko.com
Tue Feb 18 20:35:10 CET 2025


On Wed, 12 Feb 2025 10:10:55 +0100, Heiko Schocher wrote:

> Tom reported the following covervity scan error:
> 
> *** CID 541279:    (TAINTED_SCALAR)
> /drivers/led/led-uclass.c: 284 in led_get_function_name()
> 278                     if (!ret) {
> 279                             snprintf(uc_plat->name, LED_MAX_NAME_SIZE,
> 280                                      "%s:%s-%d",
> 281                                      cp ? "" : led_colors[color],
> 282                                      func ? func : "", enumerator);
> 283                     } else {
> >>>     CID 541279:    (TAINTED_SCALAR)
> >>>     Using tainted variable "color" as an index into an array
> "led_colors".
> 
> [...]

Applied to u-boot/master, thanks!

-- 
Tom




More information about the U-Boot mailing list