Commit 686b70c
net: dsa: mv88e6xxx: Fix fwnode reference leaks in mv88e6xxx_port_setup_leds
commit f63e7c8 upstream.
Fix multiple fwnode reference leaks:
1. The function calls fwnode_get_named_child_node() to get the "leds" node,
but never calls fwnode_handle_put(leds) to release this reference.
2. Within the fwnode_for_each_child_node() loop, the early return
paths that don't properly release the "led" fwnode reference.
This fix follows the same pattern as commit d029ede
("net dsa: qca8k: fix usages of device_get_named_child_node()")
Fixes: 94a2a84 ("net: dsa: mv88e6xxx: Support LED control")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patch.msgid.link/20250901073224.2273103-1-linmq006@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 0aec321 commit 686b70c
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
782 | | - | |
| 782 | + | |
| 783 | + | |
783 | 784 | | |
784 | 785 | | |
785 | 786 | | |
| |||
823 | 824 | | |
824 | 825 | | |
825 | 826 | | |
826 | | - | |
827 | | - | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
828 | 831 | | |
829 | 832 | | |
830 | 833 | | |
831 | 834 | | |
832 | 835 | | |
833 | 836 | | |
834 | | - | |
| 837 | + | |
835 | 838 | | |
836 | 839 | | |
837 | 840 | | |
| 841 | + | |
838 | 842 | | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
839 | 848 | | |
0 commit comments