OSDN Git Service

of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset()
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Fri, 2 Jun 2023 02:05:02 +0000 (11:05 +0900)
committerRob Herring <robh@kernel.org>
Fri, 9 Jun 2023 22:12:37 +0000 (16:12 -0600)
commit39affd1fdf65983904fafc07cf607cff737eaf30
tree22a40288060a93508db7c40363456cc9348fdd5d
parentb0b4a63f38d7cae3c57588592556481aedcae8b1
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>
drivers/of/overlay.c