Skip to content

Commit d7c2496

Browse files
Dan Carpenterchenhuacai
authored andcommitted
LoongArch: Delete unnecessary debugfs checking
Debugfs functions are not supposed to be checked for errors. This is sort of unusual but it is described in the comments for the debugfs_create_dir() function. Also debugfs_create_dir() can never return NULL. Reviewed-by: WANG Xuerui <git@xen0n.name> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 872b368 commit d7c2496

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

arch/loongarch/kernel/unaligned.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,6 @@ static int __init debugfs_unaligned(void)
485485
struct dentry *d;
486486

487487
d = debugfs_create_dir("loongarch", NULL);
488-
if (IS_ERR_OR_NULL(d))
489-
return -ENOMEM;
490488

491489
debugfs_create_u32("unaligned_instructions_user",
492490
S_IRUGO, d, &unaligned_instructions_user);

0 commit comments

Comments
 (0)