From bb28da90f4f973529f81be01547ebde7bf270042 Mon Sep 17 00:00:00 2001 From: Ramakrishna Pallala Date: Mon, 26 Mar 2012 15:38:26 +0530 Subject: [PATCH] max17042_battery: Fix driver exit function This patch fixes driver's remove function: it should free the IRQ. Signed-off-by: Ramakrishna Pallala Signed-off-by: Anton Vorontsov --- drivers/power/max17042_battery.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.39.5