kernel/gcov/fs.c: remove unnecessary null test before debugfs_remove
authorFabian Frederick <fabf@skynet.be>
Fri, 8 Aug 2014 21:22:20 +0000 (14:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Aug 2014 22:57:24 +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: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/gcov/fs.c

index 15ff01a7637912776f16f534e64d9e3f0d002afe..edf67c493a8e1132b79e24128c8cdea5ca85fe4d 100644 (file)
@@ -784,8 +784,7 @@ static __init int gcov_fs_init(void)
 
 err_remove:
        pr_err("init failed\n");
-       if (root_node.dentry)
-               debugfs_remove(root_node.dentry);
+       debugfs_remove(root_node.dentry);
 
        return rc;
 }