diff --git a/drivers/firmware/smccc/soc_id.c b/drivers/firmware/smccc/soc_id.c index 29299ff5e7db..1a466f5687f1 100644 --- a/drivers/firmware/smccc/soc_id.c +++ b/drivers/firmware/smccc/soc_id.c @@ -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);