]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
futex: No need to check return value of debugfs_create functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2019 15:21:39 +0000 (16:21 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 29 Jan 2019 19:15:48 +0000 (20:15 +0100)
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.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Darren Hart (VMware) <dvhart@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20190122152151.16139-40-gregkh@linuxfoundation.org
kernel/futex.c

index fdd312da09927ad43e2b6dabd7b089d3c2e8393b..69e619baf709b9245f0cbf26f8fc3c91c17fd418 100644 (file)
@@ -321,12 +321,8 @@ static int __init fail_futex_debugfs(void)
        if (IS_ERR(dir))
                return PTR_ERR(dir);
 
-       if (!debugfs_create_bool("ignore-private", mode, dir,
-                                &fail_futex.ignore_private)) {
-               debugfs_remove_recursive(dir);
-               return -ENOMEM;
-       }
-
+       debugfs_create_bool("ignore-private", mode, dir,
+                           &fail_futex.ignore_private);
        return 0;
 }