Commit 04736f7d authored by Li Zetao's avatar Li Zetao Committed by Ard Biesheuvel

efi: Remove redundant null pointer checks in efi_debugfs_init()

Since the debugfs_create_dir() never returns a null pointer, checking
the return value for a null pointer is redundant, and using IS_ERR is
safe enough.
Signed-off-by: default avatarLi Zetao <lizetao1@huawei.com>
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent 77d48d39
...@@ -349,7 +349,7 @@ static void __init efi_debugfs_init(void) ...@@ -349,7 +349,7 @@ static void __init efi_debugfs_init(void)
int i = 0; int i = 0;
efi_debugfs = debugfs_create_dir("efi", NULL); efi_debugfs = debugfs_create_dir("efi", NULL);
if (IS_ERR_OR_NULL(efi_debugfs)) if (IS_ERR(efi_debugfs))
return; return;
for_each_efi_memory_desc(md) { for_each_efi_memory_desc(md) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment