Re: [PATCH v2] misc: rp1: Fix a reference leak
From: Greg Kroah-Hartman
Date: Sun Nov 02 2025 - 20:07:35 EST
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