[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=MeXxeXq4m4nvb+P2ZQuYbQ18n4572cwkkHG+=U7nfa7Vw@mail.gmail.com>
Date: Fri, 27 Sep 2024 08:36:40 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Javier Carrasco <javier.carrasco.cruz@...il.com>
Cc: Pavel Machek <pavel@....cz>, Lee Jones <lee@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, Gene Chen <gene_chen@...htek.com>,
Jacek Anaszewski <jacek.anaszewski@...il.com>, Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>, Samuel Holland <samuel@...lland.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>, linux-leds@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-sunxi@...ts.linux.dev
Subject: Re: [PATCH 11/18] leds: max77650: switch to device_for_each_child_node_scoped()
On Fri, Sep 27, 2024 at 1:21 AM Javier Carrasco
<javier.carrasco.cruz@...il.com> wrote:
>
> Switch to device_for_each_child_node_scoped() to simplify the code by
> removing the need for calls to fwnode_handle_put() in the error paths.
>
> This also prevents possible memory leaks if new error paths are added
> without the required call to fwnode_handle_put().
>
> After switching to the scoped variant, there is no longer need for a
> jump to 'err_node_out', as an immediate return is possible.
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
> ---
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Powered by blists - more mailing lists