diff options
author | Kunihiko Hayashi <hayashi.kunihiko@socionext.com> | 2023-06-02 05:05:02 +0300 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2023-06-10 01:12:37 +0300 |
commit | 39affd1fdf65983904fafc07cf607cff737eaf30 (patch) | |
tree | 22a40288060a93508db7c40363456cc9348fdd5d | |
parent | b0b4a63f38d7cae3c57588592556481aedcae8b1 (diff) | |
download | linux-39affd1fdf65983904fafc07cf607cff737eaf30.tar.xz |
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: d1651b03c2df ("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>
-rw-r--r-- | drivers/of/overlay.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 2e01960f1aeb..7feb643f1370 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -811,6 +811,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; } |