From: sashiko-bot@kernel.org
To: "Triet Hoang" <triet.hoang.dev@gmail.com>
Cc: linux-input@vger.kernel.org, imx@lists.linux.dev,
Frank.Li@kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH] input: keyboard: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Date: Fri, 21 Aug 2026 02:52:22 +0000 [thread overview]
Message-ID: <20260821025222.A42151F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260821023951.53199-1-triet.hoang.dev@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing error handling on devm_event_notifier_register allows probe to succeed with a non-functional device.
--
--- Patch [1]: [PATCH] input: keyboard: Convert to DEFINE_SIMPLE_DEV_PM_OPS() ---
commit 88eacffae6d3079bb9f5aa0b29b554341484a82a
Author: Triet Hoang <triet.hoang.dev@gmail.com>
input: keyboard: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Convert deprecated SIMPLE_DEV_PM_OPS to DEFINE_SIMPLE_DEV_PM_OPS and
pm_sleep_ptr(). This lets us drop the __maybe_unused annotations from
the resume callbacks and reduces kernel size when CONFIG_PM or
CONFIG_PM_SLEEP is disabled.
> diff --git a/drivers/input/keyboard/imx-sm-bbm-key.c b/drivers/input/keyboard/imx-sm-bbm-key.c
> index 96486bd23d609..7fbbd44878be3 100644
> --- a/drivers/input/keyboard/imx-sm-bbm-key.c
> +++ b/drivers/input/keyboard/imx-sm-bbm-key.c
> @@ -187,7 +187,7 @@ static int scmi_imx_bbm_key_probe(struct scmi_device *sdev)
> return ret;
> }
[Severity: High]
This isn't a bug introduced by this patch, but while reviewing the probe
path I noticed an issue in scmi_imx_bbm_pwrkey_init().
When devm_event_notifier_register() fails, the error code in ret is
printed but then immediately overwritten:
drivers/input/keyboard/imx-sm-bbm-key.c:scmi_imx_bbm_pwrkey_init() {
...
ret = handle->notify_ops->devm_event_notifier_register(sdev, SCMI_PROTOCOL_IMX_BBM,
SCMI_EVENT_IMX_BBM_BUTTON,
NULL, &bbnsm->nb);
if (ret)
dev_err(dev, "Failed to register BBM Button Events %d:", ret);
ret = input_register_device(input);
...
}
Does this allow the probe to incorrectly succeed with a non-functional device
if the notifier registration fails? Should it return the error instead of
continuing to input_register_device()?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260821023951.53199-1-triet.hoang.dev@gmail.com?part=1
prev parent reply other threads:[~2026-08-21 2:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 2:39 [PATCH] input: keyboard: Convert to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
2026-08-21 2:52 ` sashiko-bot [this message]
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=20260821025222.A42151F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=imx@lists.linux.dev \
--cc=linux-input@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=triet.hoang.dev@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