]> www.infradead.org Git - users/jedix/linux-maple.git/commit
leds: powernv: Replace of_node_put to __free
authorMarileneGarcia <marilene.agarcia@gmail.com>
Sat, 1 Jun 2024 03:17:13 +0000 (00:17 -0300)
committerLee Jones <lee@kernel.org>
Wed, 26 Jun 2024 15:56:11 +0000 (16:56 +0100)
commitd35625734abea81299f75b3d05c6e2d0d6142b62
tree201e779c23ec92fed5b1d06d292f766721a4f389
parente786348b247c704081378a40341b4b36866a0395
leds: powernv: Replace of_node_put to __free

Use __free for device_node values, and thus drop calls to
of_node_put.

The variable attribute __free adds a scope based cleanup to
the device node. The goal is to reduce memory management issues
in the kernel code.

The of_node_put calls were removed, and the
for_each_available_child_of_node was replaced to the equivalent
for_each_available_child_of_node_scoped which use the __free.

Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: MarileneGarcia <marilene.agarcia@gmail.com>
Link: https://lore.kernel.org/r/20240601031713.1307859-1-marilene.agarcia@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/leds-powernv.c