diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-11-28 12:14:16 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-12-05 08:01:01 +0300 |
commit | cc5418461910dc775249e87091b2c6a3ea8d2cd3 (patch) | |
tree | ee78d46b520696a382fd5d0f0e2b8c24f6fe45b7 | |
parent | f8eec91de8b9221bc2b29f3020ec67d9b46109c7 (diff) | |
download | opensbi-cc5418461910dc775249e87091b2c6a3ea8d2cd3.tar.xz |
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>
-rw-r--r-- | lib/utils/fdt/fdt_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/fdt/fdt_helper.c b/lib/utils/fdt/fdt_helper.c index dbd7484..87b9fb2 100644 --- a/lib/utils/fdt/fdt_helper.c +++ b/lib/utils/fdt/fdt_helper.c @@ -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; |