diff options
author | Chengguang Xu <cgxu519@gmx.com> | 2018-06-12 07:48:52 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-08-02 08:27:35 -0400 |
commit | 765d28f136291f9639e3c031a1070fb76d6625c7 (patch) | |
tree | 0680d7f3c4cd2fba4ad2fc647b40a06bbbf0fbd9 | |
parent | 063daa8129f94d651c4d30a8333b577c5bbf8090 (diff) |
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.com
-rw-r--r-- | arch/x86/mm/pgtable.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index e3deefb891da..0f1683fcb196 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c | |||
@@ -329,9 +329,6 @@ static int __init pgd_cache_init(void) | |||
329 | */ | 329 | */ |
330 | pgd_cache = kmem_cache_create("pgd_cache", PGD_SIZE, PGD_ALIGN, | 330 | pgd_cache = kmem_cache_create("pgd_cache", PGD_SIZE, PGD_ALIGN, |
331 | SLAB_PANIC, NULL); | 331 | SLAB_PANIC, NULL); |
332 | if (!pgd_cache) | ||
333 | return -ENOMEM; | ||
334 | |||
335 | return 0; | 332 | return 0; |
336 | } | 333 | } |
337 | core_initcall(pgd_cache_init); | 334 | core_initcall(pgd_cache_init); |