Commit 01728d0
leds: tca6507: 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 path.
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-16-95c0614b38c8@gmail.com
Signed-off-by: Lee Jones <[email protected]>1 parent 8cf103d commit 01728d0
1 file changed
+2
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
661 | | - | |
662 | 661 | | |
663 | 662 | | |
664 | 663 | | |
| |||
671 | 670 | | |
672 | 671 | | |
673 | 672 | | |
674 | | - | |
| 673 | + | |
675 | 674 | | |
676 | 675 | | |
677 | 676 | | |
| |||
688 | 687 | | |
689 | 688 | | |
690 | 689 | | |
691 | | - | |
692 | | - | |
| 690 | + | |
693 | 691 | | |
694 | | - | |
695 | 692 | | |
696 | 693 | | |
697 | 694 | | |
| |||
0 commit comments