Re: [PATCH] extcon: ptn5150: request the IRQ after the resources its work uses
From: Krzysztof Kozlowski
Date: Thu Nov 12 2026 - 02:59:29 EST
On 12/11/2026 08:03, Myeonghun Pak wrote:
> The IRQ is requested before the work cleanup action is registered.
> On unbind, devres cancels irq_work and releases its switches before
> freeing the IRQ, allowing an interrupt to queue work against released
> resources. Earlier probe failures can leave the work uncancelled.
>
> Request the IRQ after registering the cleanup action so devres frees
> it before cancelling the work and releasing its resources. Keep
> ptn5150_init_dev_type() after the IRQ request: clearing pending status
> before installing the falling-edge handler can lose an interrupt.
>
> Found by a static analysis tool under development.
LLM is not a static analysis tool. Mentioning unknown tool is pointless.
>
> Compile-tested with W=1 for arm64 and x86_64.
> Not tested on hardware.
Drop from commit msg. Such information goes to changelog, not commit msg.
>
> Fixes: 782cd939cbe0 ("extcon: ptn5150: Add queue work sync before driver release")
> Cc: stable@xxxxxxxxxxxxxxx
With above fixed:
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>
Best regards,
Krzysztof