mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
lib: simplify fdt_parse_plicsw_node()
We should not check !plicsw_base || !size twice. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com> Reviewed-by: Bin Meng <bmeng@tinylab.org>
This commit is contained in:

committed by
Anup Patel

parent
f8eec91de8
commit
cc54184619
@@ -868,7 +868,7 @@ int fdt_parse_plicsw_node(void *fdt, int nodeoffset, unsigned long *plicsw_base,
|
||||
|
||||
rc = fdt_get_node_addr_size(fdt, nodeoffset, 0,
|
||||
®_addr, ®_size);
|
||||
if (rc < 0 || !plicsw_base || !size)
|
||||
if (rc < 0)
|
||||
return SBI_ENODEV;
|
||||
*plicsw_base = reg_addr;
|
||||
*size = reg_size;
|
||||
|
Reference in New Issue
Block a user