diff options
author | Kim Phillips <kim.phillips@amd.com> | 2021-08-18 01:10:44 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-08-26 10:14:36 +0300 |
commit | 6cf295b21608f9253037335f47cd0dfcce812d81 (patch) | |
tree | 3049a9519814750d6d11d93adbfdc29990f3953d /arch | |
parent | ffec09f9c7d7b21b0aff29dd5c3972f4631c0b6b (diff) | |
download | linux-6cf295b21608f9253037335f47cd0dfcce812d81.tar.xz |
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@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210817221048.88063-5-kim.phillips@amd.com
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/events/amd/uncore.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c index 582c0ffb5e98..05bdb4cba300 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; } |