Thread (2 messages) 2 messages, 2 authors, 2025-09-30
STALE286d LANDED

[PATCH next] Input: aw86927 - Fix error code in probe()

From: Dan Carpenter <hidden>
Date: 2025-09-30 12:25:39
Also in: kernel-janitors, lkml
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help