summaryrefslogtreecommitdiff
path: root/scripts/bpf_doc.py
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-10-02 22:21:51 +0200
committerChristophe Leroy <christophe.leroy@csgroup.eu>2024-11-14 08:24:49 +0100
commit844d098b6f33666ff544f18d7a256a46fe19328d (patch)
treec030108a88f0a87c4d21d5b648c52dc918d4581e /scripts/bpf_doc.py
parent9852d85ec9d492ebef56dc5f229416c925758edc (diff)
soc: fsl: cpm1: tsa: switch to for_each_available_child_of_node_scoped()
The non-scoped variant of this macro turns error-prone as soon as error paths are included, because explicit calls to of_node_put() are required to avoid leaking memory. Using its scoped counterpart simplifies the code by removing the need of explicit calls to of_node_put(), as they are automatically triggered as soon as the child node goes out of scope. Moreover, it is more robust as it accounts for new error paths without having to worry about decrementing the object's refcount. Note that the device_node is declared within the macro, and its explicit declaration can be dropped as well if it is not used anywhere else. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Acked-by: Herve Codina <herve.codina@bootlin.com> Link: https://lore.kernel.org/r/20241002-tsa-scoped-v1-1-ba6a6d657f82@gmail.com Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions