Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74943dab authored by Hari Bathini's avatar Hari Bathini Committed by Michael Ellerman
Browse files

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: default avatarHari Bathini <hbathini@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent d9232a3d
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -581,9 +581,10 @@ static int nvram_pstore_init(void)
	spin_lock_init(&nvram_pstore_info.buf_lock);
	spin_lock_init(&nvram_pstore_info.buf_lock);


	rc = pstore_register(&nvram_pstore_info);
	rc = pstore_register(&nvram_pstore_info);
	if (rc != 0)
	if (rc && (rc != -EPERM))
		pr_err("nvram: pstore_register() failed, defaults to "
		/* Print error only when pstore.backend == nvram */
				"kmsg_dump; returned %d\n", rc);
		pr_err("nvram: pstore_register() failed, returned %d. "
				"Defaults to kmsg_dump\n", rc);


	return rc;
	return rc;
}
}