# Re: \[PATCH v2 03/15\] ARM: exynos: fix a leaked reference by adding missing of\_node\_put

- From: Krzysztof Kozlowski \<krzk@kernel.org\>
- Date: 2019-03-19 20:40:00 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2019/03/5542872
- Thread: https://ratatoskr.run/linux-arm-kernel/2019/03/5530792/t.md

```text
On Tue, Mar 05, 2019 at 07:33:54PM +0800, Wen Yang wrote:
> The call to of_get_next_child returns a node pointer with refcount
> incremented thus it must be explicitly decremented after the last
> usage.
> 
> Detected by coccinelle with the following warnings:
> ./arch/arm/mach-exynos/firmware.c:201:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 193, but without a corresponding object release within this function.
> ./arch/arm/mach-exynos/firmware.c:204:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 193, but without a corresponding object release within this function.
> ./arch/arm/mach-exynos/suspend.c:642:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 634, but without a corresponding object release within this function.
> 
> Signed-off-by: Wen Yang <redacted>
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: <redacted>
> Cc: <redacted>
> Cc: <redacted>
> ---

Thanks, applied, with adjustments in commit msg and removal of Florian's
reviewed-by tag (I cannot find his email with review).

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
