Re: [PATCH v2] leds: max77705: use fwnode_for_each_child_node_scoped() in max77705_add_led()
From: Krzysztof Kozlowski
Date: Fri Aug 28 2026 - 05:33:04 EST
On 28/08/2026 11:00, Manush Prajwal wrote:
> Rework the subled loop in max77705_add_led() around
> fwnode_for_each_child_node_scoped() instead of adding a manual
> fwnode_handle_put(child) before the early return on a
> max77705_parse_subled() failure, so the reference on the current
> child fwnode is released automatically on every exit path from the
> loop. child is never used outside the loop, so the now-unused outer
> child declaration is dropped along with it.
>
> Suggested-by: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
That's probably a stretch, I suggested only a solution, not the commit
itself. Anyway, no need to resend to change it.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>
Best regards,
Krzysztof