Input: sparcspkr - use device managed memory for 'state'
Use devm_kzalloc() in bbc_bee_probe() and grover_beep_probe() to automatically free 'state' when the device is removed. Drop the kfree(state) calls from the probe error paths and the remove functions accordingly. Suggested-by:Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by:
Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20241021-input_automate_of_node_put-v3-1-cc73f636e1bc@gmail.com Signed-off-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Loading
Please sign in to comment