]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
powerpc/mm: book3s64: hash_utils: no need to check return value of debugfs_create...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Feb 2020 10:58:58 +0000 (11:58 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 4 Mar 2020 11:44:25 +0000 (22:44 +1100)
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: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200209105901.1620958-3-gregkh@linuxfoundation.org
arch/powerpc/mm/book3s64/hash_utils.c

index 523d4d39d11e8c2f9c091cae2b57ec626fb35af7..7e5714a69a58426ba00ffcf7d4765fd82f808cb4 100644 (file)
@@ -2018,11 +2018,8 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_hpt_order, hpt_order_get, hpt_order_set, "%llu\n")
 
 static int __init hash64_debugfs(void)
 {
-       if (!debugfs_create_file_unsafe("hpt_order", 0600, powerpc_debugfs_root,
-                                       NULL, &fops_hpt_order)) {
-               pr_err("lpar: unable to create hpt_order debugsfs file\n");
-       }
-
+       debugfs_create_file("hpt_order", 0600, powerpc_debugfs_root, NULL,
+                           &fops_hpt_order);
        return 0;
 }
 machine_device_initcall(pseries, hash64_debugfs);