summaryrefslogtreecommitdiff
path: root/drivers/power/max17042_battery.c
diff options
context:
space:
mode:
authorRamakrishna Pallala <ramakrishna.pallala@intel.com>2012-03-26 14:08:26 +0400
committerAnton Vorontsov <anton.vorontsov@linaro.org>2012-05-05 06:35:13 +0400
commitbb28da90f4f973529f81be01547ebde7bf270042 (patch)
tree97760346749393e3e7aaf470817f17d4239b19ca /drivers/power/max17042_battery.c
parent1ef3d8fb4deb77ee020b246d217dd4dfb28d88d5 (diff)
downloadlinux-bb28da90f4f973529f81be01547ebde7bf270042.tar.xz
max17042_battery: Fix driver exit function
This patch fixes driver's remove function: it should free the IRQ. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'drivers/power/max17042_battery.c')
-rw-r--r--drivers/power/max17042_battery.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
index 39dd610994ac..93fd13c9be68 100644
--- a/drivers/power/max17042_battery.c
+++ b/drivers/power/max17042_battery.c
@@ -715,6 +715,8 @@ static int __devexit max17042_remove(struct i2c_client *client)
{
struct max17042_chip *chip = i2c_get_clientdata(client);
+ if (client->irq)
+ free_irq(client->irq, chip);
power_supply_unregister(&chip->battery);
return 0;
}