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

Commit 831cf65b authored by Michael Neuling's avatar Michael Neuling Committed by Michael Ellerman
Browse files

powerpc/powernv: Check OPAL dump calls exist before using



Check that the OPAL_DUMP_READ token exists before initalising the elog
infrastructure.

This avoids littering the OPAL console with:
  "OPAL: Called with bad token 91"

Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 7dc992ec
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -427,6 +427,10 @@ void __init opal_platform_dump_init(void)
{
	int rc;

	/* ELOG not supported by firmware */
	if (!opal_check_token(OPAL_DUMP_READ))
		return;

	dump_kset = kset_create_and_add("dump", NULL, opal_kobj);
	if (!dump_kset) {
		pr_warn("%s: Failed to create dump kset\n", __func__);