hart_exts == NULL can only occur if offset and node address lead to an
overflow resulting in exactly NULL. As we don't catch other values of
overflow it does not make sense to treat this one as special.
Addresses-Coverity-ID:
1568355 Logically dead code
Addresses-Coverity-ID:
1568358 Logically dead code
Fixes: 6259b2ec2d09 ("lib: utils/fdt: Fix fdt_parse_isa_extensions() implementation")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
hart_exts = sbi_scratch_offset_ptr(scratch,
fdt_isa_bitmap_offset);
- if (!hart_exts)
- return SBI_ENOENT;
err = fdt_parse_isa_one_hart((const char *)val, hart_exts);
if (err)
return SBI_ENOENT;
hart_exts = sbi_scratch_offset_ptr(scratch, fdt_isa_bitmap_offset);
- if (!hart_exts)
- return SBI_ENOENT;
for (i = 0; i < BITS_TO_LONGS(SBI_HART_EXT_MAX); i++)
extensions[i] |= hart_exts[i];