Commit 93a04ab
ARM: omap2: Fix reference count leaks in omap_control_init()
The of_get_child_by_name() function increments the reference count
of child nodes, causing multiple reference leaks in omap_control_init():
1. scm_conf node never released in normal/error paths
2. clocks node leak when checking existence
3. Missing scm_conf release before np in error paths
Fix these leaks by adding proper of_node_put() calls and separate error
handling.
Fixes: e5b6357 ("ARM: OMAP2+: control: add syscon support for register accesses")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Reviewed-by: Andreas Kemnade <andreas@kemnade.info>
Link: https://patch.msgid.link/20251217142122.1861292-1-vulab@iscas.ac.cn
Signed-off-by: Kevin Hilman <khilman@baylibre.com>1 parent 8f0b4cc commit 93a04ab
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | | - | |
| 735 | + | |
736 | 736 | | |
737 | 737 | | |
738 | 738 | | |
| |||
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
756 | | - | |
| 756 | + | |
757 | 757 | | |
758 | 758 | | |
759 | | - | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
760 | 762 | | |
761 | 763 | | |
762 | 764 | | |
763 | 765 | | |
764 | | - | |
| 766 | + | |
765 | 767 | | |
| 768 | + | |
766 | 769 | | |
767 | 770 | | |
768 | 771 | | |
| |||
780 | 783 | | |
781 | 784 | | |
782 | 785 | | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
783 | 789 | | |
784 | 790 | | |
785 | 791 | | |
| |||
0 commit comments