lib: utils: check correct value in fdt_node_offset_by_compatible
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 8 Apr 2024 07:37:32 +0000 (09:37 +0200)
committerAnup Patel <anup@brainfault.org>
Wed, 10 Apr 2024 04:08:26 +0000 (09:38 +0530)
commit73344d4724d89ab5591311b9badfad875dddbb92
treef85ee8834a5968408784dbb19005ccb543fc006b
parent37e1544a86135c8048af77a51486397209529fff
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: 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>
lib/utils/fdt/fdt_fixup.c