[lvc-project] [PATCH net] net: dsa: hellcreek: fix missing error handling in LED registration

Kurt Kanzenbach kurt at linutronix.de
Thu Nov 13 17:24:31 MSK 2025


On Thu Nov 13 2025, Pavel Zhigulin wrote:
> The LED setup routine registered both led_sync_good
> and led_is_gm devices without checking the return
> values of led_classdev_register(). If either registration
> failed, the function continued silently, leaving the
> driver in a partially-initialized state and leaking
> a registered LED classdev.
>
> Add proper error handling
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 7d9ee2e8ff15 ("net: dsa: hellcreek: Add PTP status LEDs")
> Signed-off-by: Pavel Zhigulin <Pavel.Zhigulin at kaspersky.com>

Acked-by: Kurt Kanzenbach <kurt at linutronix.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 861 bytes
Desc: not available
URL: <http://linuxtesting.org/pipermail/lvc-project/attachments/20251113/ad57969e/attachment.pgp>


More information about the lvc-project mailing list