summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorHari Bathini <hbathini@linux.vnet.ibm.com>2015-05-11 11:23:43 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2015-08-19 09:14:21 +0300
commit74943dab6b155b1a9d4037b7f01a396f28f9c44a (patch)
treeadd1510af33198dac6d6708701b4fe06a7e7e75f /arch/powerpc
parentd9232a3da8683cd9c9854a858bcca968fe5f3bca (diff)
downloadlinux-74943dab6b155b1a9d4037b7f01a396f28f9c44a.tar.xz
powerpc/nvram: print no error when pstore backend is not nvram
Pstore only supports one backend at a time. The preferred pstore backend is set by passing the pstore.backend=<name> argument to the kernel at boot time. Currently, while trying to register with pstore, nvram throws an error message even when "pstore.backend != nvram", which is unnecessary. This patch removes the error message in case "pstore.backend != nvram". Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/nvram_64.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index 6f6597b3966b..98ba106a59ef 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -581,9 +581,10 @@ static int nvram_pstore_init(void)
spin_lock_init(&nvram_pstore_info.buf_lock);
rc = pstore_register(&nvram_pstore_info);
- if (rc != 0)
- pr_err("nvram: pstore_register() failed, defaults to "
- "kmsg_dump; returned %d\n", rc);
+ if (rc && (rc != -EPERM))
+ /* Print error only when pstore.backend == nvram */
+ pr_err("nvram: pstore_register() failed, returned %d. "
+ "Defaults to kmsg_dump\n", rc);
return rc;
}