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: 67ce5a763cfb ("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>
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);