Commit d05799d7 authored by Punit Agrawal's avatar Punit Agrawal Committed by Sudeep Holla
Browse files

firmware: smccc: Fix use of uninitialised results structure



Commit 35727af2 ("irqchip/gicv3: Workaround for NVIDIA erratum
T241-FABRIC-4") moved the initialisation of the SoC version to
arm_smccc_version_init() but forgot to update the results structure
and it's usage.

Fix the use of the uninitialised results structure and update the
error strings.

Fixes: 35727af2 ("irqchip/gicv3: Workaround for NVIDIA erratum T241-FABRIC-4")
Signed-off-by: default avatarPunit Agrawal <punit.agrawal@bytedance.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Vikram Sethi <vsethi@nvidia.com>
Cc: Shanker Donthineni <sdonthineni@nvidia.com>
Acked-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230717171702.424253-1-punit.agrawal@bytedance.com


Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent 06c2afb8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ static struct soc_device_attribute *soc_dev_attr;

static int __init smccc_soc_init(void)
{
	struct arm_smccc_res res;
	int soc_id_rev, soc_id_version;
	static char soc_id_str[20], soc_id_rev_str[12];
	static char soc_id_jep106_id_str[12];
@@ -49,13 +48,13 @@ static int __init smccc_soc_init(void)
	}

	if (soc_id_version < 0) {
		pr_err("ARCH_SOC_ID(0) returned error: %lx\n", res.a0);
		pr_err("Invalid SoC Version: %x\n", soc_id_version);
		return -EINVAL;
	}

	soc_id_rev = arm_smccc_get_soc_id_revision();
	if (soc_id_rev < 0) {
		pr_err("ARCH_SOC_ID(1) returned error: %lx\n", res.a0);
		pr_err("Invalid SoC Revision: %x\n", soc_id_rev);
		return -EINVAL;
	}