lib: fix fdt_parse_plicsw_node()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 28 Nov 2022 09:14:18 +0000 (10:14 +0100)
committerAnup Patel <anup@brainfault.org>
Mon, 5 Dec 2022 05:05:36 +0000 (10:35 +0530)
commit5daa0ef0875561e7a9152b5e75e147a3ce8afca7
tree0714e7b9db3111e29446aad7beb8f91436552917
parente9bc7f175756064cb033097dc039888431cb0e66
lib: fix fdt_parse_plicsw_node()

cpu_offset and cpu_intc_offset must be int to detect 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