aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/lm8323.c9
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);
755fail2: 755fail2:
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 }
759fail1: 762fail1:
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