Re: [PATCH] of: reserved_mem: add missing of_node_put() for proper ref-counting

From: Rob Herring
Date: Wed Oct 23 2019 - 16:14:45 EST


On Sat, 19 Oct 2019 18:57:24 -0700, Chris Goldsworthy wrote:
> Commit d698a388146c ("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: d698a388146c ("of: reserved-memory: ignore disabled memory-region nodes")
> Signed-off-by: Chris Goldsworthy <cgoldswo@xxxxxxxxxxxxxx>
> To: Rob Herring <robh+dt@xxxxxxxxxx>
> Cc: devicetree@xxxxxxxxxxxxxxx
> Cc: stable@xxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Cc: linux-arm-msm@xxxxxxxxxxxxxxx
> Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> ---
> drivers/of/of_reserved_mem.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>

Applied, thanks.

Rob