Skip to content

Commit ea6f650

Browse files
xiongzhongjiangtorvalds
authored andcommitted
kernel/fail_function.c: remove meaningless null pointer check before debugfs_remove_recursive
debugfs_remove_recursive() has taken the null pointer into account. just remove the null check before debugfs_remove_recursive(). Link: http://lkml.kernel.org/r/1537494404-16473-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhong jiang <zhongjiang@huawei.com> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Kees Cook <keescook@chromium.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent de0d22e commit ea6f650

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/fail_function.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ static void fei_debugfs_remove_attr(struct fei_attr *attr)
173173
struct dentry *dir;
174174

175175
dir = debugfs_lookup(attr->kp.symbol_name, fei_debugfs_dir);
176-
if (dir)
177-
debugfs_remove_recursive(dir);
176+
debugfs_remove_recursive(dir);
178177
}
179178

180179
static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs)

0 commit comments

Comments
 (0)