Re: [PATCH v3] powerpc: Fix missing of_node_put() calls

From
Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Date
2026-11-22 02:53:43
Reply to
Jyoti Gupta, 2026-11-20
Jyoti Gupta [off-list ref] writes:
Several PowerPC code paths acquire device tree node references but fail
to drop them on error paths, early exits.

Add the missing of_node_put() calls across PowerPC platform to ensure
proper device node reference counting.

These changes prevent device node reference leaks and improve overall
resource management in PowerPC code.

Suggested-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Jyoti Gupta <redacted>
---
v2 -> v3:
 - powermac/pci.c: Dropped __maybe_unused from the ht declaration in
   pmac_pci_init(), as ht is now used on both PPC32 and PPC64.
 - kexec/file_load_64.c: Use "goto out" for the -EOVERFLOW case in
   add_usable_mem_property() so the common of_node_put() cleanup is used,
   instead of adding a separate of_node_put() before the return.
 - Link to v2 - https://lore.kernel.org/all/20261119075827.45823-1-jyoti@linux.ibm.com/ (local)
Thanks for addressing these review comments.

The patch now LGTM. Please feel free to add:
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>


Thread (2 messages) 2 messages, 2 authors, last reply 5d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help