From: sashiko-bot@kernel.org
To: Frank.Li@oss.nxp.com
Cc: Frank.Li@kernel.org, imx@lists.linux.dev,
devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH 2/3] dt-bindings: mfd: st,stmpe: let interrupt property optional
Date: Wed, 08 Jul 2026 19:58:16 +0000 [thread overview]
Message-ID: <20260708195817.271EF1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260708-dts-stmpe-v1-2-1f51d15bb358@nxp.com>
Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider:
New issues:
- [Medium] The commit makes the `interrupts` property optional to fix a DT warning, but fails to add the corresponding driver support, leaving the device unusable in Linux.
- [Medium] Making the parent's `interrupts` property optional creates a schema contradiction with the `gpio` subnode, which unconditionally requires `interrupt-controller`.
- [Low] The commit message description is not capitalized, violating the MFD subsystem guidelines.
Pre-existing issues:
- [High] Regulator enable counts are leaked on multiple probe error paths.
- [High] The IRQ domain is not removed on probe error paths, causing a dangling pointer and UAF vulnerability.
--
--- Patch [2]: [PATCH 2/3] dt-bindings: mfd: st,stmpe: let interrupt property optional ---
commit 4dfb528c2761ff56029b1d565357b3fc0352b520
Author: Frank Li <Frank.Li@nxp.com>
> dt-bindings: mfd: st,stmpe: let interrupt property optional
[Severity: Low]
This isn't a bug introduced by this patch, but the MFD subsystem guidelines
require the commit description to be capitalized after the subsystem prefix.
Could this be updated to "dt-bindings: mfd: st,stmpe: Let interrupt property
optional"?
This patch marks the interrupt property as optional to fix CHECK_DTBS
warnings on boards that do not connect IRQ lines to the STMPE811 device.
> diff --git a/Documentation/devicetree/bindings/mfd/st,stmpe.yaml b/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
> index 32ccaafe91df9..8a6abc2f5b310 100644
> --- a/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
> +++ b/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
> @@ -221,7 +221,6 @@ additionalProperties: false
> required:
> - compatible
> - reg
> - - interrupts
[Severity: Medium]
Making the interrupts property optional creates a schema contradiction with
the gpio subnode.
The child binding in Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml
unconditionally requires interrupt-controller. If the parent lacks an
interrupt, how can it satisfy the child's requirement?
[Severity: Medium]
Does the driver currently support probing the STMPE811 without an interrupt?
Looking at the driver, it explicitly rejects the STMPE811 when configured
without an interrupt:
drivers/mfd/stmpe.c:stmpe_probe() {
...
if (!stmpe_noirq_variant_info[stmpe->partnum]) {
dev_err(stmpe->dev,
"%s does not support no-irq mode!\n",
stmpe->variant->name);
return -ENODEV;
}
...
}
Could this leave the device unusable in Linux when the device tree omits
the interrupt property?
[Severity: High]
This is a pre-existing issue, but I noticed regulator enable counts might be
leaking on probe error paths.
If devm_gpiod_get_optional() defers or fails, do we leak the enable count
for the vcc regulator?
drivers/mfd/stmpe.c:stmpe_probe() {
...
stmpe->vcc = devm_regulator_get_optional(ci->dev, "vcc");
if (!IS_ERR(stmpe->vcc)) {
ret = regulator_enable(stmpe->vcc);
...
}
...
irq_gpio = devm_gpiod_get_optional(ci->dev, "irq", GPIOD_ASIS);
ret = PTR_ERR_OR_ZERO(irq_gpio);
if (ret) {
...
return ret;
}
...
}
[Severity: High]
This is a pre-existing issue, but does the probe error path leave a dangling
pointer in the IRQ domain?
If a failure occurs after stmpe_irq_init(), like during the IRQ request:
drivers/mfd/stmpe.c:stmpe_probe() {
...
ret = devm_request_threaded_irq(ci->dev, stmpe->irq, NULL,
stmpe_irq, pdata->irq_trigger | IRQF_ONESHOT,
"stmpe", stmpe);
if (ret) {
dev_err(stmpe->dev, "failed to request IRQ: %d\n", ret);
return ret;
}
...
}
Since irq_domain_create_simple() isn't devres-managed, could this leave the
globally registered IRQ domain with a dangling host_data pointer when the
stmpe struct is freed?
>
> examples:
> - |
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260708-dts-stmpe-v1-0-1f51d15bb358@nxp.com?part=2
next prev parent reply other threads:[~2026-07-08 19:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 19:48 [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings Frank.Li
2026-07-08 19:48 ` [PATCH 1/3] dt-bindings: mfd: st,stmpe: add deprecated properties Frank.Li
2026-07-09 10:32 ` Lee Jones
2026-07-09 15:01 ` Frank Li
2026-07-08 19:48 ` [PATCH 2/3] dt-bindings: mfd: st,stmpe: let interrupt property optional Frank.Li
2026-07-08 19:58 ` sashiko-bot [this message]
2026-07-08 19:48 ` [PATCH 3/3] ARM: dts: imx: remove undocument properties of st,stmpe* Frank.Li
2026-07-08 23:09 ` [PATCH 0/3] ARM: dts: imx: cleanup st,stmpe touch screen related CHECK_DTB warings Linus Walleij
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=20260708195817.271EF1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=Frank.Li@oss.nxp.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.