backlight: led_bl: Use devm_kcalloc() for array space allocation

Replace calls of devm_kzalloc() with devm_kcalloc() in led_bl_get_leds()
and led_bl_parse_levels() for safer memory allocation with built-in
overflow protection.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: "Daniel Thompson (RISCstar)" <danielt@kernel.org>
Link: https://lore.kernel.org/r/20250819035804.433615-1-rongqianfeng@vivo.com
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
Qianfeng Rong 2025-08-19 11:58:03 +08:00 • committed by Lee Jones
commit d0fa875152