Re: [PATCH][next] of: property: Remove calls to of_node_put

From: Rob Herring (Arm)
Date: Mon May 20 2024 - 15:20:57 EST



On Thu, 16 May 2024 01:59:17 +0530, Shresth Prasad wrote:
> Add __free cleanup handler to some variable initialisations, which
> ensures that the resource is freed as soon as the variable goes out of
> scope. Thus removing the need to manually free up the resource using
> of_node_put.
>
> Suggested-by: Julia Lawall <julia.lawall@xxxxxxxx>
> Signed-off-by: Shresth Prasad <shresthprasad7@xxxxxxxxx>
> ---
> I had submitted a similar patch a couple weeks ago addressing the same
> issue, but as it turns out I wasn't thorough enough and had left a couple
> instances.
>
> I hope this isn't too big an issue.
> ---
> drivers/of/property.c | 27 +++++++++++----------------
> 1 file changed, 11 insertions(+), 16 deletions(-)
>

Applied, thanks!