iio: adc: rzg2l_adc: Use device_for_each_child_node_scoped()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 24 Feb 2024 12:32:10 +0000 (12:32 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Mar 2024 19:50:10 +0000 (19:50 +0000)
commit5cfb5587f9145ea4e6de4e5c87f9bc60b6587e3b
tree3c54ac4e51e17b634d0ef5c675715df68329ed23
parent8ca555bd059a4e645b5cf0ec09c3e002a3d347af
iio: adc: rzg2l_adc: 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.

Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20240224123215.161469-5-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/rzg2l_adc.c