Re: [PATCH v2 1/3] Input: ilitek_ts: add stylus input support
From: sashiko-bot@kernel.org
Date: 2026-07-09 18:36:01
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: Pre-existing issues: - [High] If `api_protocol_set_cmd` fails during `ilitek_suspend`, the function returns an error without re-enabling the IRQ. --
--- Patch [1]: [PATCH v2 1/3] Input: ilitek_ts: add stylus input support ---commit 93b3664194ad6413b8e1020fb08120b8f1d2a174
Author: Kristian Mide [off-list ref]
Input: ilitek_ts: add stylus input support
Add a separate stylus input device for report ID 0x0c packets,
with pressure, hover, and side-button support.
quoted hunk ↗ jump to hunk
diff --git a/drivers/input/touchscreen/ilitek_ts_i2c.c b/drivers/input/touchscreen/ilitek_ts_i2c.c index 3de0fbf8da386..54e39721f2473 100644 --- a/drivers/input/touchscreen/ilitek_ts_i2c.c +++ b/drivers/input/touchscreen/ilitek_ts_i2c.c
[ ... ]
quoted hunk ↗ jump to hunk
@@ -600,6 +720,18 @@ static int ilitek_ts_i2c_probe(struct i2c_client *client) return 0; } +static void ilitek_ts_i2c_remove(struct i2c_client *client) +{
[ ... ]
+}
+
static int ilitek_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
[Severity: High]
This isn't a bug introduced by this patch, but looking at ilitek_suspend():
drivers/input/touchscreen/ilitek_ts_i2c.c:ilitek_suspend() {
...
disable_irq(client->irq);
if (!device_may_wakeup(dev)) {
error = api_protocol_set_cmd(ts, SET_IC_SLEEP, NULL, NULL);
if (error)
return error;
...
}
If api_protocol_set_cmd() fails, does returning the error directly leave
the IRQ permanently disabled?
If an error is returned during suspend, the PM core aborts the system suspend
and will not invoke the resume callback for this device. As a result,
enable_irq() would never be called, which could leave the touchscreen
unresponsive. Should this error path re-enable the IRQ before returning?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260709182602.7308-1-kristian@mide.dk?part=1