]> Git Repo - J-linux.git/commitdiff
efi: Remove redundant null pointer checks in efi_debugfs_init()
authorLi Zetao <[email protected]>
Tue, 3 Sep 2024 14:41:15 +0000 (22:41 +0800)
committerArd Biesheuvel <[email protected]>
Fri, 13 Sep 2024 14:25:43 +0000 (16:25 +0200)
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 <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
drivers/firmware/efi/efi.c

index fdf07dd6f4591ddd4c32a80a2cf940e3d8b9d6f0..70490bf2697b165fac0548804b7bdf41749598a8 100644 (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) {
This page took 0.053833 seconds and 4 git commands to generate.