Commit d164888
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>1 parent 80f87d6 commit d164888
1 file changed
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
905 | | - | |
906 | 905 | | |
907 | 906 | | |
908 | | - | |
| 907 | + | |
909 | 908 | | |
910 | 909 | | |
911 | 910 | | |
| |||
927 | 926 | | |
928 | 927 | | |
929 | 928 | | |
930 | | - | |
931 | 929 | | |
932 | 930 | | |
933 | 931 | | |
| |||
936 | 934 | | |
937 | 935 | | |
938 | 936 | | |
939 | | - | |
940 | 937 | | |
941 | 938 | | |
942 | 939 | | |
| |||
0 commit comments