Re: [PATCH 1/3] gpio: dwapb: switch to device_for_each_child_node_scoped()
From: Linus Walleij
Date: Tue Oct 01 2024 - 10:18:23 EST
On Sat, Sep 28, 2024 at 9:47 PM Javier Carrasco
<javier.carrasco.cruz@xxxxxxxxx> wrote:
> Switch to device_for_each_child_node_scoped() to simplify the code by
> removing the need for a call to fwnode_handle_put() in the error path.
>
> This also prevents possible memory leaks if new error paths are added
> without the required call to fwnode_handle_put().
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>
Neat.
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Yours,
Linus Walleij