diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-07-30 15:05:13 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-07-30 15:18:57 -0400 |
commit | 52db9819ac96b0c5a4e075d836cf21dc529cbce4 (patch) | |
tree | 472b517df553cd4033cda36bbd34acd386a88c98 /drivers/input/keyboard | |
parent | 3f27757a1182f5e3feff7425b1c3e43f3e466724 (diff) |
Input: lm8323 - add missing device_remove_file for dev_attr_time
Add missing device_remove_file() for dev_attr_time in lm8323_remove().
Also calling device_remove_file() in lm8323_probe() error path to
remove sysfs attribute file.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/lm8323.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c index ab0acaf7fe8f..756348a7f93a 100644 --- a/drivers/input/keyboard/lm8323.c +++ b/drivers/input/keyboard/lm8323.c | |||
@@ -754,8 +754,11 @@ fail3: | |||
754 | device_remove_file(&client->dev, &dev_attr_disable_kp); | 754 | device_remove_file(&client->dev, &dev_attr_disable_kp); |
755 | fail2: | 755 | fail2: |
756 | while (--pwm >= 0) | 756 | while (--pwm >= 0) |
757 | if (lm->pwm[pwm].enabled) | 757 | if (lm->pwm[pwm].enabled) { |
758 | device_remove_file(lm->pwm[pwm].cdev.dev, | ||
759 | &dev_attr_time); | ||
758 | led_classdev_unregister(&lm->pwm[pwm].cdev); | 760 | led_classdev_unregister(&lm->pwm[pwm].cdev); |
761 | } | ||
759 | fail1: | 762 | fail1: |
760 | input_free_device(idev); | 763 | input_free_device(idev); |
761 | kfree(lm); | 764 | kfree(lm); |
@@ -775,8 +778,10 @@ static int __devexit lm8323_remove(struct i2c_client *client) | |||
775 | device_remove_file(&lm->client->dev, &dev_attr_disable_kp); | 778 | device_remove_file(&lm->client->dev, &dev_attr_disable_kp); |
776 | 779 | ||
777 | for (i = 0; i < 3; i++) | 780 | for (i = 0; i < 3; i++) |
778 | if (lm->pwm[i].enabled) | 781 | if (lm->pwm[i].enabled) { |
782 | device_remove_file(lm->pwm[i].cdev.dev, &dev_attr_time); | ||
779 | led_classdev_unregister(&lm->pwm[i].cdev); | 783 | led_classdev_unregister(&lm->pwm[i].cdev); |
784 | } | ||
780 | 785 | ||
781 | kfree(lm); | 786 | kfree(lm); |
782 | 787 | ||