linux/arch/powerpc
Ma Ke ceabfb9994 powerpc/warp: Fix error handling in pika_dtm_thread
commit 108d7f9512 upstream.

pika_dtm_thread() acquires client through of_find_i2c_device_by_node()
but fails to release it in error handling path. This could result in a
reference count leak, preventing proper cleanup and potentially
leading to resource exhaustion. Add put_device() to release the
reference in the error handling path.

Found by code review.

Cc: stable@vger.kernel.org
Fixes: 3984114f05 ("powerpc/warp: Platform fix for i2c change")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20251116024411.21968-1-make24@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-06-01 17:35:45 +02:00
..
boot powerpc/addnote: Fix overflow on 32-bit builds 2026-01-19 13:09:47 +01:00
configs arch: powerpc: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX 2025-08-28 16:24:08 +02:00
crypto powerpc: flexible GPR range save/restore macros 2022-07-12 16:35:02 +02:00
include powerpc/uaccess: Fix inline assembly for clang build on PPC32 2026-04-18 10:33:11 +02:00
kernel powerpc/smp: Add check for kcalloc() failure in parse_thread_groups() 2026-03-04 07:20:32 -05:00
kexec powerpc/crash: fix backup region offset update to elfcorehdr 2026-06-01 17:35:28 +02:00
kvm powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap() 2024-08-19 05:45:25 +02:00
lib powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC 2025-03-13 12:50:52 +01:00
math-emu powerpc/math_emu/efp: Include module.h 2022-10-26 12:35:21 +02:00
mm powerpc/64s/slb: Fix SLB multihit issue during SLB preload 2026-01-19 13:10:09 +01:00
net powerpc64/bpf: do not increment tailcall count when prog is NULL 2026-06-01 17:35:07 +02:00
perf arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src 2025-06-04 14:38:03 +02:00
platforms powerpc/warp: Fix error handling in pika_dtm_thread 2026-06-01 17:35:45 +02:00
purgatory powerpc/purgatory: remove PGO flags 2023-06-21 15:59:14 +02:00
sysdev powerpc/xics: Check return value of kasprintf in icp_native_map_one_cpu 2024-09-04 13:23:23 +02:00
tools powerpc/64: Add UADDR64 relocation support 2022-05-09 09:14:44 +02:00
xmon powerpc/xmon: Fix disassembly CPU feature checks 2024-08-19 05:45:06 +02:00
Kbuild powerpc/kexec: Move kexec files into a dedicated subdir. 2019-11-21 15:41:34 +11:00
Kconfig powerpc/memhotplug: Add add_pages override for PPC 2022-07-07 17:53:28 +02:00
Kconfig.debug powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y 2023-07-23 13:47:29 +02:00
Makefile powerpc: remove checks for binutils older than 2.25 2024-01-25 14:52:32 -08:00
Makefile.postlink powerpc: unrel_branch_check.sh: use nm to find symbol value 2020-09-02 11:00:22 +10:00