iio: adc: ti-ads1015: use device_for_each_child_node_scoped()
authorLincoln Yuji <lincolnyuji@usp.br>
Mon, 29 Apr 2024 13:22:33 +0000 (10:22 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 29 Apr 2024 20:00:10 +0000 (21:00 +0100)
commitd1648883355a25488836daf1ca26e10577c2c50c
tree2a86223a1d53d4d0463e43c0a02a0d09637df244
parent80f87d6bbc6ddcc47969c996649e8a995587e7ae
iio: adc: ti-ads1015: use device_for_each_child_node_scoped()

This loop definition removes the need for manual releasing of the
fwnode_handle in early exit paths (here an error path) allow
simplification of the code and reducing the chance of future
modifications not releasing fwnode_handle correctly.

Co-developed-by: Luiza Soezima <lbrsoezima@usp.br>
Signed-off-by: Luiza Soezima <lbrsoezima@usp.br>
Co-developed-by: Sabrina Araujo <sabrinaaraujo@usp.br>
Signed-off-by: Sabrina Araujo <sabrinaaraujo@usp.br>
Signed-off-by: Lincoln Yuji <lincolnyuji@usp.br>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://lore.kernel.org/r/20240429132233.6266-1-lincolnyuji@usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ti-ads1015.c