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>
This commit is contained in:
Tim Hansen 2017-10-07 23:15:23 -04:00 committed by Paolo Bonzini
parent 8ad8182e93
commit c1bd743e54

View File

@ -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)