mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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: d1651b03c2 ("of: overlay: add overlay symbols to live device tree")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/20230602020502.11693-1-hayashi.kunihiko@socionext.com
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
committed by
Rob Herring
parent
b0b4a63f38
commit
39affd1fdf
@@ -811,6 +811,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs)
|
|||||||
if (!fragment->target) {
|
if (!fragment->target) {
|
||||||
pr_err("symbols in overlay, but not in live tree\n");
|
pr_err("symbols in overlay, but not in live tree\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
of_node_put(node);
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user