From: Krzysztof Kozlowski Subject: Re: [PATCH v2 03/15] ARM: exynos: fix a leaked reference by adding missing of_node_put Date: Tue, 19 Mar 2019 21:39:46 +0100 Message-ID: <20190319203946.GB16150@kozik-lap> References: <1551785646-46173-1-git-send-email-wen.yang99@zte.com.cn> <1551785646-46173-3-git-send-email-wen.yang99@zte.com.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <1551785646-46173-3-git-send-email-wen.yang99@zte.com.cn> Sender: linux-kernel-owner@vger.kernel.org To: Wen Yang Cc: linux-kernel@vger.kernel.org, wang.yi59@zte.com.cn, Russell King , Kukjin Kim , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org List-Id: linux-samsung-soc@vger.kernel.org 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 > Reviewed-by: Florian Fainelli > Cc: Russell King > Cc: Kukjin Kim > Cc: Krzysztof Kozlowski > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-samsung-soc@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > --- 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