Skip to content

Commit 04736f7

Browse files
Li Zetaoardbiesheuvel
authored andcommitted
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>
1 parent 77d48d3 commit 04736f7

File tree

1 file changed

+1
-1
lines changed
  • drivers/firmware/efi

1 file changed

+1
-1
lines changed

drivers/firmware/efi/efi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static void __init efi_debugfs_init(void)
349349
int i = 0;
350350

351351
efi_debugfs = debugfs_create_dir("efi", NULL);
352-
if (IS_ERR_OR_NULL(efi_debugfs))
352+
if (IS_ERR(efi_debugfs))
353353
return;
354354

355355
for_each_efi_memory_desc(md) {

0 commit comments

Comments
 (0)