aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhong jiang <[email protected]>2018-10-30 15:04:51 -0700
committerLinus Torvalds <[email protected]>2018-10-31 08:54:12 -0700
commitea6f650465c61c70b4c96648ed2cb8a0c55db337 (patch)
tree76a4bf7f915a05fa348bef632f2449bce4cb23b7
parentde0d22e50cd3d57277f073ccf65d57aa519d6888 (diff)
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/[email protected] Signed-off-by: zhong jiang <[email protected]> Acked-by: Masami Hiramatsu <[email protected]> Acked-by: Kees Cook <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--kernel/fail_function.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/fail_function.c b/kernel/fail_function.c
index bc80a4e268c0..17f75b545f66 100644
--- a/kernel/fail_function.c
+++ b/kernel/fail_function.c
@@ -173,8 +173,7 @@ static void fei_debugfs_remove_attr(struct fei_attr *attr)
struct dentry *dir;
dir = debugfs_lookup(attr->kp.symbol_name, fei_debugfs_dir);
- if (dir)
- debugfs_remove_recursive(dir);
+ debugfs_remove_recursive(dir);
}
static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs)