Re: [PATCH] extcon: max77843: cancel the interrupt work after removing the IRQ chip

From: Krzysztof Kozlowski

Date: Thu Nov 12 2026 - 03:09:46 EST


On 12/11/2026 08:03, Myeonghun Pak wrote:
> max77843_muic_remove() cancels irq_work before removing the IRQ chip,
> so an interrupt can queue it again before the MUIC regmap and driver
> data are freed. The probe error path does not cancel the work at all.
>
> Cancel irq_work after regmap_del_irq_chip() stops its producer and
> before unregistering the MUIC I2C client. Apply the same ordering to
> the probe error path and initialize the work before that path is used.
>
> Found by a static analysis tool under development.
>
> Compile-tested with W=1 for arm64 and x86_64.
> Not tested on hardware.

So you are doing the same mistakes as vulab?

Organize your work correctly. You can also read feedback vulab received.

Best regards,
Krzysztof