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: Li Zetao <lizetao1@huawei.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Li Zetao 2024-09-03 22:41:15 +08:00 committed by Ard Biesheuvel
parent 77d48d39e9
commit 04736f7d19

View File

@ -349,7 +349,7 @@ static void __init efi_debugfs_init(void)
int i = 0;
efi_debugfs = debugfs_create_dir("efi", NULL);
if (IS_ERR_OR_NULL(efi_debugfs))
if (IS_ERR(efi_debugfs))
return;
for_each_efi_memory_desc(md) {