Commit 4825963
leds: rgb: ktd202x: 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-17-95c0614b38c8@gmail.com
Signed-off-by: Lee Jones <[email protected]>1 parent 01728d0 commit 4825963
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
499 | 498 | | |
500 | 499 | | |
501 | 500 | | |
| |||
509 | 508 | | |
510 | 509 | | |
511 | 510 | | |
512 | | - | |
| 511 | + | |
513 | 512 | | |
514 | 513 | | |
515 | | - | |
516 | | - | |
| 514 | + | |
517 | 515 | | |
518 | | - | |
| 516 | + | |
519 | 517 | | |
520 | 518 | | |
521 | 519 | | |
| |||
0 commit comments