From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Myeonghun Pak <mhun512@gmail.com>
Cc: Andy Shevchenko <andy@kernel.org>, Lee Jones <lee@kernel.org>,
mfd@lists.linux.dev, linux-kernel@vger.kernel.org,
Ijae Kim <ae878000@gmail.com>
Subject: Re: [PATCH] mfd: intel_soc_pmic_crc: balance IRQ wake enable
Date: Mon, 14 Sep 2026 11:32:49 +0300 [thread overview]
Message-ID: <aqexMdHnHHq_l0Y3@ashevche-desk.local> (raw)
In-Reply-To: <20260913013615.22615-1-mhun512@gmail.com>
On Sat, Sep 12, 2026 at 09:36:15PM -0400, Myeonghun Pak wrote:
> The INT33FD Crystal Cove driver enables the parent IRQ as a wake source
> after registering its regmap IRQ chip. When that succeeds, a later
> mfd_add_devices() failure or driver removal leaves the wake enable
> unbalanced.
>
> Register a managed action only after enable_irq_wake() succeeds. Since
> the action is registered after the managed regmap IRQ chip, reverse devres
> order disables IRQ wake before tearing down the IRQ chip. Keep warning and
> continuing when enable_irq_wake() itself fails.
>
> This is limited to the Bay Trail and Cherry Trail Crystal Cove PMIC
> variants using the INT33FD ACPI ID.
>
> This issue was identified during our ongoing static-analysis research while
> reviewing kernel code.
...
> Assisted-by: OpenAI:GPT-5.6
Assisted-by: LLM
...
> ret = enable_irq_wake(pmic->irq);
> - if (ret)
> + if (ret) {
> dev_warn(dev, "Can't enable IRQ as wake source: %d\n", ret);
> + } else {
> + ret = devm_add_action_or_reset(dev,
> + crystal_cove_disable_irq_wake, pmic);
Make it a single line.
> + if (ret)
> + return ret;
> + }
Shouldn't disable_irq_wake() be called at .shutdown() as well?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-09-14 8:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 1:36 Myeonghun Pak
2026-09-14 8:32 ` Andy Shevchenko [this message]
2026-09-14 22:16 ` Myeonghun Pak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aqexMdHnHHq_l0Y3@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=ae878000@gmail.com \
--cc=andy@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfd@lists.linux.dev \
--cc=mhun512@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®