]> www.infradead.org Git - users/jedix/linux-maple.git/commit
leds: tlc591xx: Replace of_node_put to __free
authorMarilene A Garcia <marilene.agarcia@gmail.com>
Tue, 11 Jun 2024 00:17:40 +0000 (21:17 -0300)
committerLee Jones <lee@kernel.org>
Wed, 26 Jun 2024 15:56:09 +0000 (16:56 +0100)
commit8d89afc6359c228c51087d90a4a72af2ea95140c
treeff293dceb1106ac87b909005534d814bee695ed1
parent7e776e21255bf4c271e0df0a7d289a4963580e61
leds: tlc591xx: 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 for_each_available_child_of_node() was replaced to the equivalent
for_each_available_child_of_node_scoped() which uses the __free().

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