Re: [PATCH v2] Input: sparcspkr - use cleanup facility for device_node
From: Dmitry Torokhov
Date: Mon Oct 21 2024 - 03:15:23 EST
Hi Javier,
On Sun, Oct 20, 2024 at 08:27:13PM +0200, Javier Carrasco wrote:
> Use the 'free(device_node)' macro to simplify the code by automatically
> freeing the device node, which removes the need for explicit calls to
> 'of_node_put()'.
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>
> ---
> Changes in v2:
> - rebase onto input/next, drop applied patches.
> - sparcspkr: drop goto before node declaration and return -ENOMEM.
Can we switch the driver to devm so that issues with cleanup and gotos
will have less chances of resurfacing?
Thanks.
--
Dmitry