Re: [RFC PATCH 1/2] ASoC: cs42l42: handle jack interrupt I/O and resume errors
From: Mark Brown
Date: Thu Sep 17 2026 - 17:16:47 EST
On Thu, Sep 17, 2026 at 05:23:37PM +1000, Ryan Murray wrote:
> A failed status or mask read leaves part of the interrupt snapshot
> uninitialized. The handler can then interpret that data as headset or
> button events. It also attempts register access after a failed runtime
> resume.
> + if (PM_RUNTIME_ACQUIRE_ERR(&pm))
> + return IRQ_NONE;
> guard(mutex)(&cs42l42->irq_lock);
> if (cs42l42->suspended || !cs42l42->init_done)
> return IRQ_NONE;
> + ret = regmap_read(cs42l42->regmap, irq_params_table[i].status_addr,
> + &stickies[i]);
> + if (ret)
> + goto out_error;
Don't combine goto and scope based handling, there's cases where it's a
compile error and it's just generally asking for trouble due to the
differing approaches.
Attachment:
signature.asc
Description: PGP signature