[PATCH 3/3] lib: fix irqchip_plic_update_hartid_table
Atish Patra
atishp at atishpatra.org
Wed Dec 7 08:31:11 PST 2022
On Wed, Dec 7, 2022 at 6:08 AM Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> After determining cpu_offset we have to check this value.
>
> Addresses-Coverity-ID: 1529706 ("Logically dead code")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> lib/utils/irqchip/fdt_irqchip_plic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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);
> --
> 2.37.2
>
Reviewed-by: Atish Patra <atishp at rivosinc.com>
--
Regards,
Atish
More information about the opensbi
mailing list