]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: supply: axp288_charger: Properly stop work on probe-error / remove
authorHans de Goede <hdegoede@redhat.com>
Tue, 26 Dec 2017 12:59:09 +0000 (13:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Apr 2018 10:31:08 +0000 (12:31 +0200)
commit14d7f455a4da4117078e9324422832fb2d06c4b8
treec471bc037abf30d60a9483e3304773525db3b859
parentc9ec5c8ac4188fd11960f2032f3859a0ce6c2cf7
power: supply: axp288_charger: Properly stop work on probe-error / remove

[ Upstream commit 165c2357744e41391902a2a72dd170beb60c28d5 ]

Properly stop any work we may have queued on probe-errors / remove.

Rather then adding a remove driver callback for this, and goto style
error handling to probe, use a devm_action for this.

The devm_action gets registered before we register any of the extcon
notifiers which may queue the work, devm does cleanup in reverse order,
so this ensures that the notifiers are removed before we cancel the work.

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/power/supply/axp288_charger.c