]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: Make use of the helper function devm_add_action_or_reset()
authorCai Huoqing <caihuoqing@baidu.com>
Fri, 15 Oct 2021 02:28:03 +0000 (10:28 +0800)
committerJiri Kosina <jkosina@suse.cz>
Wed, 27 Oct 2021 08:14:05 +0000 (10:14 +0200)
commit1b7f391b86dae02a27c074051a43a6a648ab8693
treebd8a04a41d19e33e9d3f16235075044632d36c98
parenteb34390b479ff088278ee8941f91de5120cc1e78
HID: wacom: Make use of the helper function devm_add_action_or_reset()

The helper function devm_add_action_or_reset() will internally
call devm_add_action(), and if devm_add_action() fails then it will
execute the action mentioned and return the error code. So
use devm_add_action_or_reset() instead of devm_add_action()
to simplify the error handling, reduce the code.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c