summaryrefslogtreecommitdiff
path: root/include/video/sstfb.h
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2024-02-25 14:27:12 +0000
committerRob Herring <robh@kernel.org>2024-03-13 16:59:00 -0600
commit34af4554fb0ce164e2c4876683619eb1e23848d4 (patch)
treed93b941ef7806963960078b7fb906b8c3dc439d5 /include/video/sstfb.h
parent9448e55d032d99af8e23487f51a542d51b2f1a48 (diff)
of: Introduce for_each_*_child_of_node_scoped() to automate of_node_put() handling
To avoid issues with out of order cleanup, or ambiguity about when the auto freed data is first instantiated, do it within the for loop definition. The disadvantage is that the struct device_node *child variable creation is not immediately obvious where this is used. However, in many cases, if there is another definition of struct device_node *child; the compiler / static analysers will notify us that it is unused, or uninitialized. Note that, in the vast majority of cases, the _available_ form should be used and as code is converted to these scoped handers, we should confirm that any cases that do not check for available have a good reason not to. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20240225142714.286440-3-jic23@kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'include/video/sstfb.h')
0 files changed, 0 insertions, 0 deletions