]> git.baikalelectronics.ru Git - kernel.git/commit
Input: adp5589-keys - use devm_kzalloc() to allocate the kpad object
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Thu, 19 Nov 2020 06:40:22 +0000 (22:40 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 19 Nov 2020 07:18:22 +0000 (23:18 -0800)
commitb4284fc35b35f0d8f169273123a4b4b46774deb1
treed6457eb116e70864ed5715f7c574d3b3313f8f93
parent66bd9a70ab9cd3a1842b41295db10cda8f8d3ab3
Input: adp5589-keys - use devm_kzalloc() to allocate the kpad object

This removes the need to manually free the kpad object and cleans up some
exit/error paths.  The error path cleanup should reduce the risk of any
memory leaks with this object.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201112074308.71351-2-alexandru.ardelean@analog.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/adp5589-keys.c