summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/unaligned.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2019-01-22 15:57:42 +0100
committerPaul Burton2019-01-22 20:17:20 +0100
commitd8140426bc39f7d4f00f6d55e1e7f269a3762ffa (patch)
tree8d9a3abd29feab75132fe14486822dcb4da746ca /arch/mips/kernel/unaligned.c
parentmips: math-emu: no need to check return value of debugfs_create functions (diff)
downloadkernel-qcow2-linux-d8140426bc39f7d4f00f6d55e1e7f269a3762ffa.tar.gz
kernel-qcow2-linux-d8140426bc39f7d4f00f6d55e1e7f269a3762ffa.tar.xz
kernel-qcow2-linux-d8140426bc39f7d4f00f6d55e1e7f269a3762ffa.zip
mips: kernel: 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. Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Burton <paul.burton@mips.com> Cc: James Hogan <jhogan@kernel.org> Cc: Yangtao Li <tiny.windzz@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> Cc: Mathieu Malaterre <malat@debian.org> Cc: Huacai Chen <chenhc@lemote.com> Cc: Marcin Nowakowski <marcin.nowakowski@mips.com> Cc: Yasha Cherikovsky <yasha.che3@gmail.com> Cc: linux-mips@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Burton <paul.burton@mips.com>
Diffstat (limited to 'arch/mips/kernel/unaligned.c')
-rw-r--r--arch/mips/kernel/unaligned.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c
index 595ca9c85111..0ed20a64b285 100644
--- a/arch/mips/kernel/unaligned.c
+++ b/arch/mips/kernel/unaligned.c
@@ -2374,18 +2374,10 @@ sigbus:
#ifdef CONFIG_DEBUG_FS
static int __init debugfs_unaligned(void)
{
- struct dentry *d;
-
- if (!mips_debugfs_dir)
- return -ENODEV;
- d = debugfs_create_u32("unaligned_instructions", S_IRUGO,
- mips_debugfs_dir, &unaligned_instructions);
- if (!d)
- return -ENOMEM;
- d = debugfs_create_u32("unaligned_action", S_IRUGO | S_IWUSR,
- mips_debugfs_dir, &unaligned_action);
- if (!d)
- return -ENOMEM;
+ debugfs_create_u32("unaligned_instructions", S_IRUGO, mips_debugfs_dir,
+ &unaligned_instructions);
+ debugfs_create_u32("unaligned_action", S_IRUGO | S_IWUSR,
+ mips_debugfs_dir, &unaligned_action);
return 0;
}
arch_initcall(debugfs_unaligned);