summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi
diff options
context:
space:
mode:
authorLi Zetao <lizetao1@huawei.com>2024-09-03 22:41:15 +0800
committerArd Biesheuvel <ardb@kernel.org>2024-09-13 16:25:43 +0200
commit04736f7d1945722117def1462fd3602c72c02272 (patch)
treeb8bdfd0351ee107ac9d229ab8536ac861a3ec8db /drivers/firmware/efi
parent77d48d39e99170b528e4f2e9fc5d1d64cdedd386 (diff)
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>
Diffstat (limited to 'drivers/firmware/efi')
-rw-r--r--drivers/firmware/efi/efi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index fdf07dd6f459..70490bf2697b 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -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) {