iio: adc: max11410: Use device_for_each_child_node_scoped()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 17 Feb 2024 16:42:39 +0000 (16:42 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Mar 2024 19:50:09 +0000 (19:50 +0000)
commit1693d2a7459183dcc8e7e89d849076f082f3d4c9
treee7658b38b1d2a1ae96c0b895d07dca6c3c1f91ef
parent365130fd47af6d4317aa16a407874b699ab8d8cb
iio: adc: max11410: 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.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240217164249.921878-6-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/max11410.c