This is a note to let you know that I've just added the patch titled of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset() to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: of-overlay-fix-missing-of_node_put-in-error-case-of-.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit ce327b8514a21adc4de6c53d04d328fe25d1b7ad Author: Kunihiko Hayashi <hayashi.kunihiko@xxxxxxxxxxxxx> Date: Fri Jun 2 11:05:02 2023 +0900 of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset() [ Upstream commit 39affd1fdf65983904fafc07cf607cff737eaf30 ] In init_overlay_changeset(), the variable "node" is from of_get_child_by_name(), and the "node" should be discarded in error case. Fixes: d1651b03c2df ("of: overlay: add overlay symbols to live device tree") Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20230602020502.11693-1-hayashi.kunihiko@xxxxxxxxxxxxx Signed-off-by: Rob Herring <robh@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 119dd6a0be868..74dd63089bb46 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -818,6 +818,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs) if (!fragment->target) { pr_err("symbols in overlay, but not in live tree\n"); ret = -EINVAL; + of_node_put(node); goto err_out; }