ANDROID: GKI: Fix firmware: smccc build error

In commit 0ca5de8309 ("firmware: smccc: Fix use of uninitialised
results structure"), a unused variable was removed, but in the
android-specific changes in the function, the variable was still needed,
so it broke the build.  Fix this up by putting the variable back as it
is required and set it properly.

Fixes: 0ca5de8309 ("firmware: smccc: Fix use of uninitialised results structure")
Change-Id: Icef4bcc0403f4f09fb7ca3a72346007af79f7f8e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2023-09-30 16:10:53 +00:00
parent 82a49ac6c8
commit 9e3a2d05a6

View File

@ -34,6 +34,7 @@ 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];
@ -54,17 +55,7 @@ static int __init smccc_soc_init(void)
return 0;
}
if (soc_id_version < 0) {
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("Invalid SoC Revision: %x\n", soc_id_rev);
return -EINVAL;
}
soc_id_version = arm_smccc_get_version();
soc_id_rev = res.a0;
soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);