Commit 61bb5a78 authored by Axel Lin's avatar Axel Lin Committed by Anton Vorontsov

da9052-battery: Fix a memory leak when unload the module

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
parent e1be8329
...@@ -634,6 +634,7 @@ static int __devexit da9052_bat_remove(struct platform_device *pdev) ...@@ -634,6 +634,7 @@ static int __devexit da9052_bat_remove(struct platform_device *pdev)
free_irq(bat->da9052->irq_base + irq, bat); free_irq(bat->da9052->irq_base + irq, bat);
} }
power_supply_unregister(&bat->psy); power_supply_unregister(&bat->psy);
kfree(bat);
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