提交 c1bd743e 编写于 作者: T Tim Hansen 提交者: Paolo Bonzini

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: NTim Hansen <devtimhansen@gmail.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 8ad8182e
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册