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>
This commit is contained in:
Jacob Garber 2019-08-09 17:13:58 -06:00 committed by Anup Patel
parent 3f738f5897
commit 6ddf71e6e9

View file

@ -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)