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>
diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c index 39dd610..93fd13c 100644 --- a/drivers/power/max17042_battery.c +++ b/drivers/power/max17042_battery.c
@@ -715,6 +715,8 @@ { struct max17042_chip *chip = i2c_get_clientdata(client); + if (client->irq) + free_irq(client->irq, chip); power_supply_unregister(&chip->battery); return 0; }