Skip to content

Commit

Permalink
power_supply: ipaq_micro_battery: Fix leaking workqueue
Browse files Browse the repository at this point in the history
Driver allocates singlethread workqueue in probe but it is not destroyed
during removal.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Fixes: 00a588f ("power: add driver for battery reading on iPaq h3xxx")
Cc: <stable@vger.kernel.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
  • Loading branch information
krzk authored and sre committed Feb 25, 2015
1 parent 68c3ed6 commit f852ec4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/power/ipaq_micro_battery.c
Expand Up @@ -251,6 +251,7 @@ static int micro_batt_remove(struct platform_device *pdev)
power_supply_unregister(&micro_ac_power);
power_supply_unregister(&micro_batt_power);
cancel_delayed_work_sync(&mb->update);
destroy_workqueue(mb->wq);

return 0;
}
Expand Down

0 comments on commit f852ec4

Please sign in to comment.