mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user