diff options
-rw-r--r-- | drivers/of/overlay.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 4cdee169a5ab..791753321ed2 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -311,10 +311,10 @@ static int add_changeset_node(struct overlay_changeset *ovcs, return build_changeset_next_level(ovcs, tchild, node, 0); } - if (node->phandle) - return -EINVAL; - - ret = build_changeset_next_level(ovcs, tchild, node, 0); + if (node->phandle && tchild->phandle) + ret = -EINVAL; + else + ret = build_changeset_next_level(ovcs, tchild, node, 0); of_node_put(tchild); return ret; |