Skip to content

Commit d05799d

Browse files
Punit Agrawalsudeep-holla
authored andcommitted
firmware: smccc: Fix use of uninitialised results structure
Commit 35727af ("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: 35727af ("irqchip/gicv3: Workaround for NVIDIA erratum T241-FABRIC-4") Signed-off-by: Punit 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: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230717171702.424253-1-punit.agrawal@bytedance.com Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
1 parent 06c2afb commit d05799d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/firmware/smccc/soc_id.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ static struct soc_device_attribute *soc_dev_attr;
3434

3535
static int __init smccc_soc_init(void)
3636
{
37-
struct arm_smccc_res res;
3837
int soc_id_rev, soc_id_version;
3938
static char soc_id_str[20], soc_id_rev_str[12];
4039
static char soc_id_jep106_id_str[12];
@@ -49,13 +48,13 @@ static int __init smccc_soc_init(void)
4948
}
5049

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

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

0 commit comments

Comments
 (0)