diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-12-08 02:14:21 +0100 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-12-09 11:27:28 +0530 |
commit | 7b087781c210b756f6c6ca8e66d43a6d3b02af0a (patch) | |
tree | 7af9c58bcb496d95d6a28049c33a70a7cd892571 | |
parent | c2be21432c00840e6b2d2e5cdc668b5ee6180738 (diff) | |
download | opensbi-7b087781c210b756f6c6ca8e66d43a6d3b02af0a.zip opensbi-7b087781c210b756f6c6ca8e66d43a6d3b02af0a.tar.gz opensbi-7b087781c210b756f6c6ca8e66d43a6d3b02af0a.tar.bz2 |
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>
-rw-r--r-- | lib/utils/irqchip/fdt_irqchip_plic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/irqchip/fdt_irqchip_plic.c b/lib/utils/irqchip/fdt_irqchip_plic.c index a6e185c..fe08836 100644 --- a/lib/utils/irqchip/fdt_irqchip_plic.c +++ b/lib/utils/irqchip/fdt_irqchip_plic.c @@ -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); |