From: tip-bot for Chengguang Xu <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: cgxu519@gmx.com, tglx@linutronix.de, mingo@kernel.org,
hpa@zytor.com, linux-kernel@vger.kernel.org
Subject: [tip:x86/mm] x86/mm: Remove redundant check for kmem_cache_create()
Date: Thu, 2 Aug 2018 05:31:54 -0700 [thread overview]
Message-ID: <tip-765d28f136291f9639e3c031a1070fb76d6625c7@git.kernel.org> (raw)
In-Reply-To: <1528804132-154948-1-git-send-email-cgxu519@gmx.com>
Commit-ID: 765d28f136291f9639e3c031a1070fb76d6625c7
Gitweb: https://git.kernel.org/tip/765d28f136291f9639e3c031a1070fb76d6625c7
Author: Chengguang Xu <cgxu519@gmx.com>
AuthorDate: Tue, 12 Jun 2018 19:48:52 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 2 Aug 2018 14:27:35 +0200
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
---
arch/x86/mm/pgtable.c | 3 ---
1 file changed, 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)
*/
pgd_cache = kmem_cache_create("pgd_cache", PGD_SIZE, PGD_ALIGN,
SLAB_PANIC, NULL);
- if (!pgd_cache)
- return -ENOMEM;
-
return 0;
}
core_initcall(pgd_cache_init);
prev parent reply other threads:[~2018-08-02 12:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 11:48 [PATCH v2] x86: remove " Chengguang Xu
2018-08-02 12:31 ` tip-bot for Chengguang Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-765d28f136291f9639e3c031a1070fb76d6625c7@git.kernel.org \
--to=tipbot@zytor.com \
--cc=cgxu519@gmx.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome