lib: simplify fdt_parse_plmt_node()

We should not check !plmt_base || !plmt_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:
Heinrich Schuchardt
2022-11-28 10:14:15 +01:00
committed by Anup Patel
parent fc82e84329
commit f8eec91de8

View File

@@ -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,
&reg_addr, &reg_size);
if (rc < 0 || !plmt_base || !plmt_size)
if (rc < 0)
return SBI_ENODEV;
*plmt_base = reg_addr;
*plmt_size = reg_size;