x86/mm: Remove redundant check for kmem_cache_create()
The flag 'SLAB_PANIC' implies panic on failure, So there is no need to check the returned pointer for NULL. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/1528804132-154948-1-git-send-email-cgxu519@gmx.comzero-colors
parent
063daa8129
commit
765d28f136
|
@ -329,9 +329,6 @@ static int __init pgd_cache_init(void)
|
||||||
*/
|
*/
|
||||||
pgd_cache = kmem_cache_create("pgd_cache", PGD_SIZE, PGD_ALIGN,
|
pgd_cache = kmem_cache_create("pgd_cache", PGD_SIZE, PGD_ALIGN,
|
||||||
SLAB_PANIC, NULL);
|
SLAB_PANIC, NULL);
|
||||||
if (!pgd_cache)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
core_initcall(pgd_cache_init);
|
core_initcall(pgd_cache_init);
|
||||||
|
|
Loading…
Reference in New Issue