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

Commit 7dc992ec authored by Michael Neuling's avatar Michael Neuling Committed by Michael Ellerman
Browse files

powerpc/powernv: Check OPAL elog calls exist before using



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

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

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

	/* ELOG not supported by firmware */
	if (!opal_check_token(OPAL_ELOG_READ))
		return -1;

	elog_kset = kset_create_and_add("elog", NULL, opal_kobj);
	if (!elog_kset) {
		pr_warn("%s: failed to create elog kset\n", __func__);