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>