Skip to content

Commit

Permalink
kernel/gcov/fs.c: remove unnecessary null test before debugfs_remove
Browse files Browse the repository at this point in the history
This fixes checkpatch warning:

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

Signed-off-by: Fabian Frederick <[email protected]>
Cc: Peter Oberparleiter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Fabian Frederick authored and torvalds committed Aug 8, 2014
1 parent b134079 commit 834b18b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/gcov/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 834b18b

Please sign in to comment.