Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 2fe97fcc authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

iio: addac: ad74413r: Use device_for_each_child_node_scoped()


Switching to the _scoped() version removes the need for manual
calling of fwnode_handle_put() in the paths where the code
exits the loop early. In this case that's all in error paths.

The use of fwnode_for_each_available_child_node() here is assumed
to have been down to a false assumption that device_for_each_child_node()
doesn't check avaialble - so this transition to the scoped
device_for_each_child_node_scoped() is equivalent.

Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: default avatarNuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240217164249.921878-13-jic23@kernel.org


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 1693d2a7
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment