summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/ptdump/ptdump.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-09 11:58:59 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2020-03-04 22:44:25 +1100
commitf3c05201950a71c1b8b4f11828303f76c5dd0944 (patch)
treece749fdc9e611d676c3caa0a115be1c76738d9ea /arch/powerpc/mm/ptdump/ptdump.c
parent08f6a7974ab949d43c2584f966db458d255b2b0a (diff)
downloadlinux-f3c05201950a71c1b8b4f11828303f76c5dd0944.tar.bz2
powerpc/mm: ptdump: 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. 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-4-gregkh@linuxfoundation.org
Diffstat (limited to 'arch/powerpc/mm/ptdump/ptdump.c')
-rw-r--r--arch/powerpc/mm/ptdump/ptdump.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdump.c
index 206156255247..d92bb8ea229c 100644
--- a/arch/powerpc/mm/ptdump/ptdump.c
+++ b/arch/powerpc/mm/ptdump/ptdump.c
@@ -417,12 +417,10 @@ void ptdump_check_wx(void)
static int ptdump_init(void)
{
- struct dentry *debugfs_file;
-
populate_markers();
build_pgtable_complete_mask();
- debugfs_file = debugfs_create_file("kernel_page_tables", 0400, NULL,
- NULL, &ptdump_fops);
- return debugfs_file ? 0 : -ENOMEM;
+ debugfs_create_file("kernel_page_tables", 0400, NULL, NULL,
+ &ptdump_fops);
+ return 0;
}
device_initcall(ptdump_init);