Skip to content

Commit

Permalink
max17042_battery: Fix driver exit function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ramakrishna Pallala authored and Anton Vorontsov committed May 5, 2012
1 parent 1ef3d8f commit bb28da9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/power/max17042_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bb28da9

Please sign in to comment.