Skip to content

Commit 39affd1

Browse files
khayash1robherring
authored andcommitted
of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset()
In init_overlay_changeset(), the variable "node" is from of_get_child_by_name(), and the "node" should be discarded in error case. Fixes: d1651b0 ("of: overlay: add overlay symbols to live device tree") Signed-off-by: Kunihiko Hayashi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring <[email protected]>
1 parent b0b4a63 commit 39affd1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/of/overlay.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs)
811811
if (!fragment->target) {
812812
pr_err("symbols in overlay, but not in live tree\n");
813813
ret = -EINVAL;
814+
of_node_put(node);
814815
goto err_out;
815816
}
816817

0 commit comments

Comments
 (0)