Commit 19d1cc7
leds: flash: mt6370: 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-2-95c0614b38c8@gmail.com
Signed-off-by: Lee Jones <[email protected]>1 parent 73b03b2 commit 19d1cc7
1 file changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
513 | 512 | | |
514 | 513 | | |
515 | 514 | | |
| |||
529 | 528 | | |
530 | 529 | | |
531 | 530 | | |
532 | | - | |
| 531 | + | |
533 | 532 | | |
534 | 533 | | |
535 | 534 | | |
536 | 535 | | |
537 | 536 | | |
538 | | - | |
539 | | - | |
| 537 | + | |
540 | 538 | | |
541 | | - | |
542 | 539 | | |
543 | 540 | | |
544 | | - | |
545 | | - | |
| 541 | + | |
546 | 542 | | |
547 | | - | |
548 | 543 | | |
549 | 544 | | |
550 | 545 | | |
| |||
0 commit comments