diff options
| author | Heinrich Schuchardt <[email protected]> | 2022-12-08 02:14:21 +0100 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2022-12-09 11:27:28 +0530 |
| commit | 7b087781c210b756f6c6ca8e66d43a6d3b02af0a (patch) | |
| tree | 7af9c58bcb496d95d6a28049c33a70a7cd892571 | |
| parent | c2be21432c00840e6b2d2e5cdc668b5ee6180738 (diff) | |
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 <[email protected]>
Reviewed-by: Xiang W <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
| -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 a6e185cf..fe08836a 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); |
