mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
lib: fix irqchip_plic_update_hartid_table
After determining cpu_offset we have to check this value. Addresses-Coverity-ID: 1529706 ("Logically dead code") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
c2be21432c
commit
7b087781c2
@@ -86,7 +86,7 @@ static int irqchip_plic_update_hartid_table(void *fdt, int nodeoff,
|
||||
continue;
|
||||
|
||||
cpu_offset = fdt_parent_offset(fdt, cpu_intc_offset);
|
||||
if (cpu_intc_offset < 0)
|
||||
if (cpu_offset < 0)
|
||||
continue;
|
||||
|
||||
err = fdt_parse_hart_id(fdt, cpu_offset, &hartid);
|
||||
|
Reference in New Issue
Block a user