Skip to content

Commit

Permalink
mm: cleancache: no need to check return value of debugfs_create funct…
Browse files Browse the repository at this point in the history
…ions

When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: [email protected]
Acked-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Jun 3, 2019
1 parent 8c0fd1f commit c4e4134
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/cleancache.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,7 @@ static int __init init_cleancache(void)
{
#ifdef CONFIG_DEBUG_FS
struct dentry *root = debugfs_create_dir("cleancache", NULL);
if (root == NULL)
return -ENXIO;

debugfs_create_u64("succ_gets", 0444, root, &cleancache_succ_gets);
debugfs_create_u64("failed_gets", 0444, root, &cleancache_failed_gets);
debugfs_create_u64("puts", 0444, root, &cleancache_puts);
Expand Down

0 comments on commit c4e4134

Please sign in to comment.