max17042_battery: Fix driver exit function
authorRamakrishna Pallala <ramakrishna.pallala@intel.com>
Mon, 26 Mar 2012 10:08:26 +0000 (15:38 +0530)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Sat, 5 May 2012 02:35:13 +0000 (19:35 -0700)
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>
drivers/power/max17042_battery.c

index 39dd610994acea729a65e60fbc0ca866498e7d78..93fd13c9be68a1350d3945fe6c9c9a80be1b96c2 100644 (file)
@@ -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;
 }