]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
power: supply: axp288_charger: Do not cancel work before initializing it
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Fri, 20 Feb 2026 17:49:39 +0000 (18:49 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 3 Mar 2026 22:58:08 +0000 (23:58 +0100)
commit658342fd75b582cbb06544d513171c3d645faead
tree02e8207ed28739e24cffa3102bea2d1a404232f2
parentf0c8407c83a596dcb5aeaa940b1f8ed43631ae46
power: supply: axp288_charger: Do not cancel work before initializing it

Driver registered devm handler to cancel_work_sync() before even the
work was initialized, thus leading to possible warning from
kernel/workqueue.c on (!work->func) check, if the error path was hit
before the initialization happened.

Use devm_work_autocancel() on each work item independently, which
handles the initialization and handler to cancel work.

Fixes: 165c2357744e ("power: supply: axp288_charger: Properly stop work on probe-error / remove")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Reviewed-by: Chen-Yu Tsai <wens@kernel.org>
Link: https://patch.msgid.link/20260220174938.672883-5-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/axp288_charger.c