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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {