On Mon, Sep 1, 2025 at 9:32 AM Miaoqian Lin linmq006@gmail.com wrote:
Fix multiple fwnode reference leaks:
The function calls fwnode_get_named_child_node() to get the "leds" node, but never calls fwnode_handle_put(leds) to release this reference.
Within the fwnode_for_each_child_node() loop, the early return paths that don't properly release the "led" fwnode reference.
This fix follows the same pattern as commit d029edefed39 ("net dsa: qca8k: fix usages of device_get_named_child_node()")
Fixes: 94a2a84f5e9e ("net: dsa: mv88e6xxx: Support LED control") Cc: stable@vger.kernel.org Signed-off-by: Miaoqian Lin linmq006@gmail.com
changes in v2:
- use goto for cleanup in error paths
- v1: https://lore.kernel.org/all/20250830085508.2107507-1-linmq006@gmail.com/
When I coded it I honestly believed fwnode_get_named_child_node() also released the children after use but apparently not, my bad :(
Reviewed-by: Linus Walleij linus.walleij@linaro.org
Yours, Linus Walleij