lib: fix fdt_parse_plmt_node()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 28 Nov 2022 09:14:17 +0000 (10:14 +0100)
committerAnup Patel <anup@brainfault.org>
Mon, 5 Dec 2022 05:03:42 +0000 (10:33 +0530)
commite9bc7f175756064cb033097dc039888431cb0e66
tree67cbaf7bea0b7956ec04079635bb85e39b3246d2
parentcc5418461910dc775249e87091b2c6a3ea8d2cd3
lib: fix fdt_parse_plmt_node()

cpu_offset, cpu_intc_offset must be int to discover failed invocations of
fdt_node_offset_by_phandle() or fdt_parent_offset().

After determining cpu_offset we have to check this value and not
cpu_intc_offset.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Bin Meng <bmeng@tinylab.org>
lib/utils/fdt/fdt_helper.c