hwmon: (g762) handle cleanup with devm_add_action
authorHao Peng <peng.hao2@zte.com.cn>
Thu, 1 Mar 2018 14:48:30 +0000 (22:48 +0800)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 11 Mar 2018 03:00:14 +0000 (19:00 -0800)
commit47591baa713cb23db7ea012bc1710f58efc14abf
tree302c5d456f22e4ee2ad05969e4ee698ff5ba0611
parentb20edea9a666235c91175ab654e440345afdcdef
hwmon: (g762) handle cleanup with devm_add_action

Simplify code and use devm_add_action() to handle cleanup.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
[groeck: Dropped unnecessary dummy function and NULL check]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/g762.c