of: unittest: Use for_each_child_of_node_scoped()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 25 Feb 2024 14:27:13 +0000 (14:27 +0000)
committerRob Herring <robh@kernel.org>
Wed, 13 Mar 2024 22:59:00 +0000 (16:59 -0600)
commit2056b282ad191589e4ceb5a8fdab639b9549edc6
treee8f75de84d1672c360cc41da3309a609317aa208
parent34af4554fb0ce164e2c4876683619eb1e23848d4
of: unittest: Use for_each_child_of_node_scoped()

A simple example of the utility of this autocleanup approach to
handling of_node_put().

In this particular case some of the nodes needed for the test are
not available and the _available_ version would cause them to be
skipped resulting in a test failure.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240225142714.286440-4-jic23@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/unittest.c