From: Ramakrishna Pallala Date: Mon, 26 Mar 2012 10:08:26 +0000 (+0530) Subject: max17042_battery: Fix driver exit function X-Git-Tag: v3.5-rc1~23^2~25 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bb28da90f4f973529f81be01547ebde7bf270042;p=karo-tx-linux.git 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 --- 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; }