The following commit has been merged into the perf/core branch of tip: Commit-ID: 6cf295b21608f9253037335f47cd0dfcce812d81 Gitweb: https://git.kernel.org/tip/6cf295b21608f9253037335f47cd0dfcce812d81 Author: Kim Phillips <kim.phillips@xxxxxxx> AuthorDate: Tue, 17 Aug 2021 17:10:44 -05:00 Committer: Ingo Molnar <mingo@xxxxxxxxxx> CommitterDate: Thu, 26 Aug 2021 09:14:36 +02:00 perf/amd/uncore: Simplify code, use free_percpu()'s built-in check for NULL free_percpu() has its own check for NULL, no need to open-code it. Signed-off-by: Kim Phillips <kim.phillips@xxxxxxx> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx> Link: https://lore.kernel.org/r/20210817221048.88063-5-kim.phillips@xxxxxxx --- arch/x86/events/amd/uncore.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c index 582c0ff..05bdb4c 100644 --- a/arch/x86/events/amd/uncore.c +++ b/arch/x86/events/amd/uncore.c @@ -659,11 +659,9 @@ fail_prep: fail_llc: if (boot_cpu_has(X86_FEATURE_PERFCTR_NB)) perf_pmu_unregister(&amd_nb_pmu); - if (amd_uncore_llc) - free_percpu(amd_uncore_llc); + free_percpu(amd_uncore_llc); fail_nb: - if (amd_uncore_nb) - free_percpu(amd_uncore_nb); + free_percpu(amd_uncore_nb); return ret; }
![]() |