Commit d81418c1 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Sasha Levin

power_supply: ipaq_micro_battery: Fix leaking workqueue

[ Upstream commit f852ec46 ]

Driver allocates singlethread workqueue in probe but it is not destroyed
during removal.
Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Fixes: 00a588f9 ("power: add driver for battery reading on iPaq h3xxx")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 58aad404
...@@ -251,6 +251,7 @@ static int micro_batt_remove(struct platform_device *pdev) ...@@ -251,6 +251,7 @@ static int micro_batt_remove(struct platform_device *pdev)
power_supply_unregister(&micro_ac_power); power_supply_unregister(&micro_ac_power);
power_supply_unregister(&micro_batt_power); power_supply_unregister(&micro_batt_power);
cancel_delayed_work_sync(&mb->update); cancel_delayed_work_sync(&mb->update);
destroy_workqueue(mb->wq);
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