Commit e2a2e56e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Catalin Marinas

arm64: dump: 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: Will Deacon <will.deacon@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Peng Donglin <dolinux.peng@gmail.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 0bd3ef34
...@@ -34,13 +34,10 @@ struct ptdump_info { ...@@ -34,13 +34,10 @@ struct ptdump_info {
void ptdump_walk_pgd(struct seq_file *s, struct ptdump_info *info); void ptdump_walk_pgd(struct seq_file *s, struct ptdump_info *info);
#ifdef CONFIG_ARM64_PTDUMP_DEBUGFS #ifdef CONFIG_ARM64_PTDUMP_DEBUGFS
int ptdump_debugfs_register(struct ptdump_info *info, const char *name); void ptdump_debugfs_register(struct ptdump_info *info, const char *name);
#else #else
static inline int ptdump_debugfs_register(struct ptdump_info *info, static inline void ptdump_debugfs_register(struct ptdump_info *info,
const char *name) const char *name) { }
{
return 0;
}
#endif #endif
void ptdump_check_wx(void); void ptdump_check_wx(void);
#endif /* CONFIG_ARM64_PTDUMP_CORE */ #endif /* CONFIG_ARM64_PTDUMP_CORE */
......
...@@ -407,7 +407,7 @@ void ptdump_check_wx(void) ...@@ -407,7 +407,7 @@ void ptdump_check_wx(void)
static int ptdump_init(void) static int ptdump_init(void)
{ {
ptdump_initialize(); ptdump_initialize();
return ptdump_debugfs_register(&kernel_ptdump_info, ptdump_debugfs_register(&kernel_ptdump_info, "kernel_page_tables");
"kernel_page_tables"); return 0;
} }
device_initcall(ptdump_init); device_initcall(ptdump_init);
...@@ -12,10 +12,7 @@ static int ptdump_show(struct seq_file *m, void *v) ...@@ -12,10 +12,7 @@ static int ptdump_show(struct seq_file *m, void *v)
} }
DEFINE_SHOW_ATTRIBUTE(ptdump); DEFINE_SHOW_ATTRIBUTE(ptdump);
int ptdump_debugfs_register(struct ptdump_info *info, const char *name) void ptdump_debugfs_register(struct ptdump_info *info, const char *name)
{ {
struct dentry *pe; debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
pe = debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
return pe ? 0 : -ENOMEM;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment