Commit 3d422a4
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>1 parent b764459 commit 3d422a4
1 file changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
897 | | - | |
898 | | - | |
899 | | - | |
| 897 | + | |
| 898 | + | |
900 | 899 | | |
901 | | - | |
902 | 900 | | |
903 | 901 | | |
904 | 902 | | |
| |||
0 commit comments