[PATCH v2] Input: sparcspkr - use cleanup facility for device_node

Dmitry Torokhov dmitry.torokhov at gmail.com
Mon Oct 21 00:15:04 PDT 2024


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 at gmail.com>
> ---
> 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



More information about the Linux-mediatek mailing list