[PATCH v2] soc: atmel: fix device_node release in atmel_soc_device_init()
Claudiu Beznea
claudiu.beznea at tuxon.dev
Sun Dec 8 07:52:19 PST 2024
On 31.10.2024 14:33, Javier Carrasco wrote:
> A device_node acquired via of_find_node_by_path() requires explicit
> calls to of_node_put() when it is no longer needed to avoid leaking the
> resource.
>
> Instead of adding the missing calls to of_node_put() in all execution
> paths, use the cleanup attribute for 'np' by means of the __free()
> macro, which automatically calls of_node_put() when the variable goes
> out of scope.
>
> Fixes: 960ddf70cc11 ("drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz at gmail.com>
Applied to at91-soc, thanks!
More information about the linux-arm-kernel
mailing list