mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
Merge "soc: qcom: socinfo: Fix array out-of-bounds access"
This commit is contained in:
commit
fbb9d05d4b
1 changed files with 13 additions and 13 deletions
|
|
@ -1163,20 +1163,6 @@ static void socinfo_print(void)
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t socinfo_get_id(void)
|
||||
{
|
||||
return (socinfo) ? le32_to_cpu(socinfo->id) : 0;
|
||||
}
|
||||
EXPORT_SYMBOL(socinfo_get_id);
|
||||
|
||||
const char *socinfo_get_id_string(void)
|
||||
{
|
||||
uint32_t id = socinfo_get_id();
|
||||
|
||||
return (socinfo) ? soc_id[id].name : NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(socinfo_get_id_string);
|
||||
|
||||
static const char *socinfo_machine(unsigned int id)
|
||||
{
|
||||
int idx;
|
||||
|
|
@ -1189,6 +1175,20 @@ static const char *socinfo_machine(unsigned int id)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
uint32_t socinfo_get_id(void)
|
||||
{
|
||||
return (socinfo) ? le32_to_cpu(socinfo->id) : 0;
|
||||
}
|
||||
EXPORT_SYMBOL(socinfo_get_id);
|
||||
|
||||
const char *socinfo_get_id_string(void)
|
||||
{
|
||||
uint32_t id = socinfo_get_id();
|
||||
|
||||
return socinfo_machine(id);
|
||||
}
|
||||
EXPORT_SYMBOL(socinfo_get_id_string);
|
||||
|
||||
static int qcom_socinfo_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct qcom_socinfo *qs;
|
||||
|
|
|
|||
Loading…
Reference in a new issue