lib: utils: check correct value in fdt_node_offset_by_compatible
After calling fdt_node_offset_by_compatible() we must check its return
value and not an unrelated value.
Addresses-Coverity-ID: 1584993 Logically dead code
Fixes: 67ce5a763c
("platform: generic: Add support for specify coldboot harts in DT")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
parent
37e1544a86
commit
73344d4724
|
@ -394,7 +394,7 @@ void fdt_config_fixup(void *fdt)
|
|||
return;
|
||||
|
||||
config_offset = fdt_node_offset_by_compatible(fdt, chosen_offset, "opensbi,config");
|
||||
if (chosen_offset < 0)
|
||||
if (config_offset < 0)
|
||||
return;
|
||||
|
||||
fdt_nop_node(fdt, config_offset);
|
||||
|
|
Loading…
Reference in New Issue