Commit f64dd42
leds: flash: leds-qcom-flash: Switch to device_for_each_child_node_scoped()
Switch to device_for_each_child_node_scoped() to simplify the code by
removing the need for calls to fwnode_handle_put() in the error paths.
This also prevents possible memory leaks if new error paths are added
without the required call to fwnode_handle_put().
Signed-off-by: Javier Carrasco <[email protected]>
Link: https://lore.kernel.org/r/20240927-leds_device_for_each_child_node_scoped-v1-3-95c0614b38c8@gmail.com
Signed-off-by: Lee Jones <[email protected]>1 parent 19d1cc7 commit f64dd42
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
815 | | - | |
816 | 815 | | |
817 | 816 | | |
818 | 817 | | |
| |||
896 | 895 | | |
897 | 896 | | |
898 | 897 | | |
899 | | - | |
| 898 | + | |
900 | 899 | | |
901 | 900 | | |
902 | 901 | | |
| |||
914 | 913 | | |
915 | 914 | | |
916 | 915 | | |
917 | | - | |
918 | 916 | | |
919 | 917 | | |
920 | 918 | | |
| |||
0 commit comments