From: Dan Carpenter Date: Thu, 29 Jun 2023 12:58:42 +0000 (+0800) Subject: LoongArch: Delete unnecessary debugfs checking X-Git-Tag: v6.6.7~2496^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7c24960975b02211c53afe97c36acde5c8ff933;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Dan Carpenter Signed-off-by: Huacai Chen --- diff --git a/arch/loongarch/kernel/unaligned.c b/arch/loongarch/kernel/unaligned.c index 85fae3d..3abf163 100644 --- a/arch/loongarch/kernel/unaligned.c +++ b/arch/loongarch/kernel/unaligned.c @@ -485,8 +485,6 @@ static int __init debugfs_unaligned(void) struct dentry *d; d = debugfs_create_dir("loongarch", NULL); - if (IS_ERR_OR_NULL(d)) - return -ENOMEM; debugfs_create_u32("unaligned_instructions_user", S_IRUGO, d, &unaligned_instructions_user);