of: property: Use scope based cleanup on port_node
authorShresth Prasad <shresthprasad7@gmail.com>
Sun, 28 Apr 2024 11:52:27 +0000 (17:22 +0530)
committerRob Herring (Arm) <robh@kernel.org>
Fri, 3 May 2024 12:50:04 +0000 (07:50 -0500)
commit3fe5a2b9e7b4f2dad254b9c5a8e926cbcdebb49c
tree8af5b1741fb15e91f03b5af7bb5c8977bb7d37b0
parentc56436ef17520c5fb0f9c2fc47aa961a7946895f
of: property: Use scope based cleanup on port_node

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@inria.fr>
Signed-off-by: Shresth Prasad <shresthprasad7@gmail.com>
Link: https://lore.kernel.org/r/20240428115226.41345-2-shresthprasad7@gmail.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
drivers/of/property.c