diff options
author | Tim Hansen <devtimhansen@gmail.com> | 2017-10-08 06:15:23 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-10-12 15:01:54 +0300 |
commit | c1bd743e54cd653bd5e7082255dc236cfd40dbf0 (patch) | |
tree | a613a9249170e4b8f49e0de00e023fe783400390 /arch/x86/kvm | |
parent | 8ad8182e935030f5af5122ce0c137529cb53b013 (diff) | |
download | linux-c1bd743e54cd653bd5e7082255dc236cfd40dbf0.tar.xz |
arch/x86: remove redundant null checks before kmem_cache_destroy
Remove redundant null checks before calling kmem_cache_destroy.
Found with make coccicheck M=arch/x86/kvm on linux-next tag
next-20170929.
Signed-off-by: Tim Hansen <devtimhansen@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/mmu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index cdedf5320145..d7a7eafc5ade 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -5463,10 +5463,8 @@ static struct shrinker mmu_shrinker = { static void mmu_destroy_caches(void) { - if (pte_list_desc_cache) - kmem_cache_destroy(pte_list_desc_cache); - if (mmu_page_header_cache) - kmem_cache_destroy(mmu_page_header_cache); + kmem_cache_destroy(pte_list_desc_cache); + kmem_cache_destroy(mmu_page_header_cache); } int kvm_mmu_module_init(void) |