aboutsummaryrefslogtreecommitdiff
path: root/drivers/core/ofnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/core/ofnode.c')
-rw-r--r--drivers/core/ofnode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index eeeccfb4467..dda6c76e834 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -329,7 +329,8 @@ static fdt_addr_t __ofnode_get_addr_size_index(ofnode node, int index,
{
int na, ns;
- *size = FDT_SIZE_T_NONE;
+ if (size)
+ *size = FDT_SIZE_T_NONE;
if (ofnode_is_np(node)) {
const __be32 *prop_val;
@@ -340,6 +341,7 @@ static fdt_addr_t __ofnode_get_addr_size_index(ofnode node, int index,
&flags);
if (!prop_val)
return FDT_ADDR_T_NONE;
+
if (size)
*size = size64;
@@ -359,8 +361,6 @@ static fdt_addr_t __ofnode_get_addr_size_index(ofnode node, int index,
index, na, ns, size,
translate);
}
-
- return FDT_ADDR_T_NONE;
}
fdt_addr_t ofnode_get_addr_size_index(ofnode node, int index, fdt_size_t *size)