diff options
author | Jacob Garber <jgarber1@ualberta.ca> | 2019-08-09 17:13:58 -0600 |
---|---|---|
committer | Anup Patel <anup.patel@wdc.com> | 2019-08-12 09:23:28 +0530 |
commit | 6ddf71e6e90878ee107b0d9f98492ad27d31c73a (patch) | |
tree | 220bf987879a8c9b18b2165352fb738a25308c9d /lib/utils/irqchip | |
parent | 3f738f5897a6694b8630d3a9c6751f49c3c7d540 (diff) |
lib: Use correct type for return value
The error check 'plic_off < 0' does nothing, since plic_off is stored as
a u32. Fix this by changing it to an int, which matches the return type of
fdt_node_offset_by_compatible().
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/utils/irqchip')
-rw-r--r-- | lib/utils/irqchip/plic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/irqchip/plic.c b/lib/utils/irqchip/plic.c index 5dcbce0..ea09f0a 100644 --- a/lib/utils/irqchip/plic.c +++ b/lib/utils/irqchip/plic.c @@ -51,7 +51,7 @@ void plic_fdt_fixup(void *fdt, const char *compat) { u32 *cells; int i, cells_count; - u32 plic_off; + int plic_off; plic_off = fdt_node_offset_by_compatible(fdt, 0, compat); if (plic_off < 0) |