linux/arch/powerpc/platforms/82xx
Ally Heev acd1e47db0 powerpc: 82xx: fix uninitialized pointers with free attribute
Uninitialized pointers with `__free` attribute can cause undefined
behavior as the memory allocated to the pointer is freed automatically
when the pointer goes out of scope.

powerpc/km82xx doesn't have any bugs related to this as of now, but,
it is better to initialize and assign pointers with `__free` attribute
in one statement to ensure proper scope-based cleanup

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/aPiG_F5EBQUjZqsl@stanley.mountain/
Signed-off-by: Ally Heev <allyheev@gmail.com>
Fixes: 4aa5cc1e00 ("powerpc-km82xx.c: replace of_node_put() with __free")
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20251116-aheev-uninitialized-free-attr-km82xx-v2-1-4307e2b5300d@gmail.com
2026-05-12 11:48:47 +05:30
..
ep8248e.c powerpc/ep8248e: Use %pa to format resource_size_t 2024-11-14 22:26:40 +11:00
Kconfig powerpc/82xx: Select FSL_SOC 2023-09-18 12:23:48 +10:00
km82xx.c powerpc: 82xx: fix uninitialized pointers with free attribute 2026-05-12 11:48:47 +05:30
Makefile powerpc: drop MPC8272-ADS and PowerQUICC II FADS shared code. 2023-04-20 13:21:48 +10:00
pq2.c powerpc/82xx: Remove pq2_init_pci 2023-08-18 17:03:14 +10:00
pq2.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00