diff options
| author | Heinrich Schuchardt <[email protected]> | 2022-11-28 10:14:15 +0100 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2022-12-05 10:10:48 +0530 |
| commit | f8eec91de8b9221bc2b29f3020ec67d9b46109c7 (patch) | |
| tree | 3155f19feaa9790adecdaba655403d96cc93b49b | |
| parent | fc82e84329760540ec62b257c700025ba37cb7ab (diff) | |
lib: simplify fdt_parse_plmt_node()
We should not check !plmt_base || !plmt_size twice.
Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Xiang W <[email protected]>
Reviewed-by: Yu Chien Peter Lin <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
| -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 89b8bbac..dbd74841 100644 --- a/lib/utils/fdt/fdt_helper.c +++ b/lib/utils/fdt/fdt_helper.c @@ -814,7 +814,7 @@ int fdt_parse_plmt_node(void *fdt, int nodeoffset, unsigned long *plmt_base, rc = fdt_get_node_addr_size(fdt, nodeoffset, 0, ®_addr, ®_size); - if (rc < 0 || !plmt_base || !plmt_size) + if (rc < 0) return SBI_ENODEV; *plmt_base = reg_addr; *plmt_size = reg_size; |
