fs/dlm/debug_fs.c: remove unnecessary null test before debugfs_remove
authorFabian Frederick <fabf@skynet.be>
Fri, 8 Aug 2014 21:23:37 +0000 (14:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Aug 2014 22:57:27 +0000 (15:57 -0700)
This fixes checkpatch warning:

  WARNING: debugfs_remove(NULL) is safe this check is probably not required

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Christine Caulfield <ccaulfie@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/dlm/debug_fs.c

index 8d77ba7b17564676bf1053ef7258fd3f4898abf1..1323c568e3627a4b69a9e46026d5dbb29a48ac53 100644 (file)
@@ -718,16 +718,11 @@ static const struct file_operations waiters_fops = {
 
 void dlm_delete_debug_file(struct dlm_ls *ls)
 {
-       if (ls->ls_debug_rsb_dentry)
-               debugfs_remove(ls->ls_debug_rsb_dentry);
-       if (ls->ls_debug_waiters_dentry)
-               debugfs_remove(ls->ls_debug_waiters_dentry);
-       if (ls->ls_debug_locks_dentry)
-               debugfs_remove(ls->ls_debug_locks_dentry);
-       if (ls->ls_debug_all_dentry)
-               debugfs_remove(ls->ls_debug_all_dentry);
-       if (ls->ls_debug_toss_dentry)
-               debugfs_remove(ls->ls_debug_toss_dentry);
+       debugfs_remove(ls->ls_debug_rsb_dentry);
+       debugfs_remove(ls->ls_debug_waiters_dentry);
+       debugfs_remove(ls->ls_debug_locks_dentry);
+       debugfs_remove(ls->ls_debug_all_dentry);
+       debugfs_remove(ls->ls_debug_toss_dentry);
 }
 
 int dlm_create_debug_file(struct dlm_ls *ls)