]> git.ipfire.org Git - thirdparty/linux.git/commit
perf/core: Simplify the perf_event_alloc() error path
authorPeter Zijlstra <peterz@infradead.org>
Mon, 4 Nov 2024 13:39:13 +0000 (14:39 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 4 Mar 2025 08:42:14 +0000 (09:42 +0100)
commitc70ca298036c58a88686ff388d3d367e9d21acf0
tree249fa4fd366f6e0d6053de8622c408d8eed8847e
parent061c991697062f3bf87b72ed553d1d33a0e370dd
perf/core: Simplify the perf_event_alloc() error path

The error cleanup sequence in perf_event_alloc() is a subset of the
existing _free_event() function (it must of course be).

Split this out into __free_event() and simplify the error path.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
Link: https://lore.kernel.org/r/20241104135517.967889521@infradead.org
include/linux/perf_event.h
kernel/events/core.c