fdt_fixup: initialize nodeoff before setting property

Nodeoff must be initialized to ensure root node is present.

Change-Id: I1091a816f5b92c3f798222da9c987d899ef4bc9f
Signed-off-by: Sanjeev N <nsanjeev@codeaurora.org>
This commit is contained in:
Sanjeev N 2018-07-20 16:24:48 +05:30
parent b819be2c53
commit 8a07eb223e

View file

@ -535,6 +535,13 @@ void ipq_fdt_fixup_socinfo(void *blob)
uint32_t soc_version, soc_version_major, soc_version_minor;
int nodeoff, ret;
nodeoff = fdt_path_offset(blob, "/");
if (nodeoff < 0) {
printf("ipq: fdt fixup cannot find root node\n");
return;
}
ret = ipq_smem_get_socinfo_cpu_type(&cpu_type);
if (ret) {
return;