]> www.infradead.org Git - users/dwmw2/linux.git/commit
perf/x86/rapl: Fix error handling in init_rapl_pmus()
authorDhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Thu, 20 Mar 2025 10:06:19 +0000 (10:06 +0000)
committerIngo Molnar <mingo@kernel.org>
Thu, 20 Mar 2025 20:03:55 +0000 (21:03 +0100)
commit7e512f5ad24458e2c930b5be5d96ddf9e176e05d
tree41e5dcf385acf8b64c0adf0a93a156e689691525
parent65a99264f5e5a2bcc8c905f7b2d633e8991672ac
perf/x86/rapl: Fix error handling in init_rapl_pmus()

If init_rapl_pmu() fails while allocating memory for "rapl_pmu" objects,
we miss freeing the "rapl_pmus" object in the error path. Fix that.

Fixes: 9b99d65c0bb4 ("perf/x86/rapl: Move the pmu allocation out of CPU hotplug")
Signed-off-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250320100617.4480-1-dhananjay.ugwekar@amd.com
arch/x86/events/rapl.c