realtek: rtl930x: Fix out-of-bounds check in LED set configuration
authorSven Eckelmann <[email protected]>
Tue, 15 Jul 2025 17:53:07 +0000 (19:53 +0200)
committerHauke Mehrtens <[email protected]>
Mon, 6 Oct 2025 22:13:43 +0000 (00:13 +0200)
commitfb01b901e739b0a5db2088b09fb018c906206995
tree344e06dcdc50f00e1ffdf999efb7e5347c99875b
parentebb79d0f846a957b3046825ed644b8b936451431
realtek: rtl930x: Fix out-of-bounds check in LED set configuration

of_property_count_u32_elems returns the number of u32 and not the number of
bytes. It must therefore be checked against the number of u32 in set_config
and not the bytes in set_config.

Fixes: 2cfb1ecf1035 ("rtl930x: Rework per port LED configuration")
Signed-off-by: Sven Eckelmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20300
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c