From: Joy Zou <joy.zou@nxp.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Frank Li <Frank.Li@nxp.com>, Peng Fan <peng.fan@nxp.com>,
Jacky Bai <ping.bai@nxp.com>, Ye Li <ye.li@nxp.com>
Cc: imx@lists.linux.dev, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org, Joy Zou <joy.zou@nxp.com>
Subject: [PATCH v2 2/4] Input: snvs_pwrkey - replace hardcoding -EINVAL with original error code
Date: Thu, 04 Jun 2026 14:56:22 +0800 [thread overview]
Message-ID: <20260604-pwrkey-cleanup-v2-2-59fa0ddf0d7c@nxp.com> (raw)
In-Reply-To: <20260604-pwrkey-cleanup-v2-0-59fa0ddf0d7c@nxp.com>
Hardcoding -EINVAL discards the actual error code, which breaks probe
deferral (-EPROBE_DEFER) and loses critical diagnostic information
needed for proper kernel error handling.
Signed-off-by: Joy Zou <joy.zou@nxp.com>
---
drivers/input/keyboard/snvs_pwrkey.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c
index 748196fcce75ba7192b1ee5fc516bdf4a9ae074d..a291812e6d22ea963568cced5b889bad00658526 100644
--- a/drivers/input/keyboard/snvs_pwrkey.c
+++ b/drivers/input/keyboard/snvs_pwrkey.c
@@ -148,7 +148,7 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
pdata->irq = platform_get_irq(pdev, 0);
if (pdata->irq < 0)
- return -EINVAL;
+ return pdata->irq;
error = of_property_read_u32(np, "power-off-time-sec", &val);
if (!error) {
--
2.50.1
next prev parent reply other threads:[~2026-06-04 6:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 6:56 [PATCH v2 0/4] snvs_pwrkey - code improvements and add report event Joy Zou
2026-06-04 6:56 ` [PATCH v2 1/4] Input: snvs_pwrkey - make use of dev_err_probe() Joy Zou
2026-06-04 6:56 ` Joy Zou [this message]
2026-06-04 6:56 ` [PATCH v2 3/4] Input: snvs_pwrkey - use local device pointer to simple code Joy Zou
2026-06-04 6:56 ` [PATCH v2 4/4] Input: snvs_pwrkey - report press event in interrupt handler Joy Zou
2026-06-05 6:59 ` Bough Chen
2026-06-15 3:52 ` Joy Zou
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=20260604-pwrkey-cleanup-v2-2-59fa0ddf0d7c@nxp.com \
--to=joy.zou@nxp.com \
--cc=Frank.Li@nxp.com \
--cc=dmitry.torokhov@gmail.com \
--cc=imx@lists.linux.dev \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=ping.bai@nxp.com \
--cc=ye.li@nxp.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®