From: Dan Carpenter <dan.carpenter@linaro.org>
To: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH next] Input: aw86927 - Fix error code in probe()
Date: Tue, 30 Sep 2025 15:25:33 +0300 [thread overview]
Message-ID: <aNvMPTnOovdBitdP@stanley.mountain> (raw)
Fix this copy and paste bug. Return "err" instead of
PTR_ERR(haptics->regmap).
Fixes: 52e06d564ce6 ("Input: aw86927 - add driver for Awinic AW86927")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/input/misc/aw86927.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/input/misc/aw86927.c b/drivers/input/misc/aw86927.c
index a0c88a7e1e1c..8ad361239cfe 100644
--- a/drivers/input/misc/aw86927.c
+++ b/drivers/input/misc/aw86927.c
@@ -759,8 +759,7 @@ static int aw86927_probe(struct i2c_client *client)
/* Software reset */
err = regmap_write(haptics->regmap, AW86927_RSTCFG_REG, AW86927_RSTCFG_SOFTRST);
if (err)
- return dev_err_probe(haptics->dev, PTR_ERR(haptics->regmap),
- "Failed Software reset\n");
+ return dev_err_probe(haptics->dev, err, "Failed Software reset\n");
/* Wait ~3ms until I2C is accessible */
usleep_range(3000, 3500);
--
2.51.0
next reply other threads:[~2025-09-30 12:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-30 12:25 Dan Carpenter [this message]
2025-09-30 20:47 ` [PATCH next] Input: aw86927 - Fix error code in probe() Dmitry Torokhov
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=aNvMPTnOovdBitdP@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=dmitry.torokhov@gmail.com \
--cc=griffin.kroah@fairphone.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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.