mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-03-16 03:41:24 +00: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:
parent
3f738f5897
commit
6ddf71e6e9
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue