Commit bb28da90 authored by Ramakrishna Pallala's avatar Ramakrishna Pallala Committed by Anton Vorontsov

max17042_battery: Fix driver exit function

This patch fixes driver's remove function: it should free the IRQ.
Signed-off-by: default avatarRamakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
parent 1ef3d8fb
...@@ -715,6 +715,8 @@ static int __devexit max17042_remove(struct i2c_client *client) ...@@ -715,6 +715,8 @@ static int __devexit max17042_remove(struct i2c_client *client)
{ {
struct max17042_chip *chip = i2c_get_clientdata(client); struct max17042_chip *chip = i2c_get_clientdata(client);
if (client->irq)
free_irq(client->irq, chip);
power_supply_unregister(&chip->battery); power_supply_unregister(&chip->battery);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment