aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/memtrace.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-09 11:59:01 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2020-03-04 22:44:26 +1100
commitf344f0ab993987ae29cb39cc52054d7346db082f (patch)
tree3a971f94e35f4c20a1e0de5461e5ddf8fc8e4124 /arch/powerpc/platforms/powernv/memtrace.c
parentpowerpc/cell/axon_msi: no need to check return value of debugfs_create functions (diff)
downloadlinux-dev-f344f0ab993987ae29cb39cc52054d7346db082f.tar.xz
linux-dev-f344f0ab993987ae29cb39cc52054d7346db082f.zip
powerpc/powernv: 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> Reviewed-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200209105901.1620958-6-gregkh@linuxfoundation.org
Diffstat (limited to 'arch/powerpc/platforms/powernv/memtrace.c')
-rw-r--r--arch/powerpc/platforms/powernv/memtrace.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/powernv/memtrace.c b/arch/powerpc/platforms/powernv/memtrace.c
index eb2e75dac369..d6d64f8718e6 100644
--- a/arch/powerpc/platforms/powernv/memtrace.c
+++ b/arch/powerpc/platforms/powernv/memtrace.c
@@ -187,11 +187,6 @@ static int memtrace_init_debugfs(void)
snprintf(ent->name, 16, "%08x", ent->nid);
dir = debugfs_create_dir(ent->name, memtrace_debugfs_dir);
- if (!dir) {
- pr_err("Failed to create debugfs directory for node %d\n",
- ent->nid);
- return -1;
- }
ent->dir = dir;
debugfs_create_file("trace", 0400, dir, ent, &memtrace_fops);
@@ -314,8 +309,6 @@ static int memtrace_init(void)
{
memtrace_debugfs_dir = debugfs_create_dir("memtrace",
powerpc_debugfs_root);
- if (!memtrace_debugfs_dir)
- return -1;
debugfs_create_file("enable", 0600, memtrace_debugfs_dir,
NULL, &memtrace_init_fops);