Re: [PATCH][next] of: property: Use scope based cleanup on port_node

From: Rob Herring
Date: Mon Apr 29 2024 - 12:27:29 EST



On Sun, 28 Apr 2024 17:22:27 +0530, Shresth Prasad wrote:
> Use __free cleanup handler which ensures that the resource is freed when
> it goes out of scope, thus removing the need to manually clean it up
> using of_node_put.
>
> Suggested-by: Julia Lawall <julia.lawall@xxxxxxxx>
> Signed-off-by: Shresth Prasad <shresthprasad7@xxxxxxxxx>
> ---
> Rob Herring <robh@xxxxxxxxxx> sent a patch fixing similar cases in
> property.c but seems to have missed this one. Please let me know if this
> is mistake, or if it was left unchanged for a reason.
>
> drivers/of/property.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>

Applied, thanks!