]> git.baikalelectronics.ru Git - kernel.git/commit
of: reserved_mem: add missing of_node_put() for proper ref-counting
authorChris Goldsworthy <cgoldswo@codeaurora.org>
Sun, 20 Oct 2019 01:57:24 +0000 (18:57 -0700)
committerRob Herring <robh@kernel.org>
Wed, 23 Oct 2019 20:15:05 +0000 (15:15 -0500)
commit6ea931ed35f2a2f477bf293edcc5cf59310772d1
tree973fade922a5eac94982b602d8a8c540aa78965b
parentc94034038864e915dba0f4baacd5808ce0307fe2
of: reserved_mem: add missing of_node_put() for proper ref-counting

Commit c6eef54c147d ("of: reserved-memory: ignore disabled memory-region
nodes") added an early return in of_reserved_mem_device_init_by_idx(), but
didn't call of_node_put() on a device_node whose ref-count was incremented
in the call to of_parse_phandle() preceding the early exit.

Fixes: c6eef54c147d ("of: reserved-memory: ignore disabled memory-region nodes")
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
Cc: stable@vger.kernel.org
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/of_reserved_mem.c