diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index eda57ef12fd057b3d92c750dec983703e85f38e3..baa9cee6fa2c33ae6007b74b6a5ec9a476d7f0f0 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -378,7 +378,9 @@ static int add_changeset_node(struct overlay_changeset *ovcs, if (ret) return ret; - return build_changeset_next_level(ovcs, tchild, node); + ret = build_changeset_next_level(ovcs, tchild, node); + of_node_put(tchild); + return ret; } if (node->phandle && tchild->phandle)