Re: [PATCH 1/4] power: supply: axp288_charger: Do not cancel work before initializing it

From: Chen-Yu Tsai

Date: Sat Feb 21 2026 - 00:08:46 EST


On Sat, Feb 21, 2026 at 1:49 AM Krzysztof Kozlowski
<krzysztof.kozlowski@xxxxxxxxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxxxxxxx>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>

Reviewed-by: Chen-Yu Tsai <wens@xxxxxxxxxx>