diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-06 00:46:09 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-06 06:07:17 +0100 |
commit | d9f7979c92f7b34469c1ca5d1f3add6681fd567c (patch) | |
tree | ad8b342028e101065d752fe1fe18199766e289e3 /mm/gup_benchmark.c | |
parent | mm/memory.c: prevent mapping typed pages to userspace (diff) | |
download | linux-d9f7979c92f7b34469c1ca5d1f3add6681fd567c.tar.xz linux-d9f7979c92f7b34469c1ca5d1f3add6681fd567c.zip |
mm: no need to check return value of debugfs_create functions
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.
Link: http://lkml.kernel.org/r/20190122152151.16139-14-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: Laura Abbott <labbott@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/gup_benchmark.c')
-rw-r--r-- | mm/gup_benchmark.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mm/gup_benchmark.c b/mm/gup_benchmark.c index 5b42d3d4b60a..6c0279e70cc4 100644 --- a/mm/gup_benchmark.c +++ b/mm/gup_benchmark.c @@ -122,12 +122,8 @@ static const struct file_operations gup_benchmark_fops = { static int gup_benchmark_init(void) { - void *ret; - - ret = debugfs_create_file_unsafe("gup_benchmark", 0600, NULL, NULL, - &gup_benchmark_fops); - if (!ret) - pr_warn("Failed to create gup_benchmark in debugfs"); + debugfs_create_file_unsafe("gup_benchmark", 0600, NULL, NULL, + &gup_benchmark_fops); return 0; } |