[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025110353-whoops-concert-5d18@gregkh>
Date: Mon, 3 Nov 2025 10:06:08 +0900
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Andrea della Porta <andrea.porta@...e.com>,
Arnd Bergmann <arnd@...db.de>, Bjorn Helgaas <bhelgaas@...gle.com>,
Florian Fainelli <florian.fainelli@...adcom.com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: [PATCH v2] misc: rp1: Fix a reference leak
On Fri, Oct 24, 2025 at 09:36:11PM +0200, Christophe JAILLET wrote:
> The reference taken by of_find_node_by_name() in the probe is not released
> in the remove function.
>
> In order to avoid a reference leak, use cleanup.h to automatically
> release the reference at the end of the probe when it is not needed
> anymore.
>
> In order to do so, a reference also needs to be taken when DT is not used.
>
> This simplifies the error handling path and makes direct returns possible
> in several places.
>
> While at it, also add a missing \n at the end of an error message.
This means this should be 2 different patches :)
thanks,
greg k-h
Powered by blists - more mailing lists