diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-09 11:58:59 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-03-04 12:44:25 +0100 |
commit | f3c05201950a71c1b8b4f11828303f76c5dd0944 (patch) | |
tree | ce749fdc9e611d676c3caa0a115be1c76738d9ea /arch/powerpc/mm/ptdump/segment_regs.c | |
parent | powerpc/mm: book3s64: hash_utils: no need to check return value of debugfs_cr... (diff) | |
download | linux-f3c05201950a71c1b8b4f11828303f76c5dd0944.tar.xz linux-f3c05201950a71c1b8b4f11828303f76c5dd0944.zip |
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 '')
-rw-r--r-- | arch/powerpc/mm/ptdump/segment_regs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/powerpc/mm/ptdump/segment_regs.c b/arch/powerpc/mm/ptdump/segment_regs.c index 501843664bb9..dde2fe8de4b2 100644 --- a/arch/powerpc/mm/ptdump/segment_regs.c +++ b/arch/powerpc/mm/ptdump/segment_regs.c @@ -55,10 +55,8 @@ static const struct file_operations sr_fops = { static int __init sr_init(void) { - struct dentry *debugfs_file; - - debugfs_file = debugfs_create_file("segment_registers", 0400, - powerpc_debugfs_root, NULL, &sr_fops); - return debugfs_file ? 0 : -ENOMEM; + debugfs_create_file("segment_registers", 0400, powerpc_debugfs_root, + NULL, &sr_fops); + return 0; } device_initcall(sr_init); |