perf/core: Simplify perf_pmu_register()

Using the previously introduced perf_pmu_free() and a new IDR helper,
simplify the perf_pmu_register error paths.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Ravi Bangoria <ravi.bangoria@amd.com>
Link: https://lore.kernel.org/r/20241104135518.198937277@infradead.org
This commit is contained in:
Peter Zijlstra 2024-11-04 14:39:15 +01:00 • committed by Ingo Molnar
commit 6c8b0b835f
2 changed files with 46 additions and 42 deletions