Skip to contentSkip to conversation

Input: aw86927 - Fix error code in probe()

PATCH Applied Dan Carpenter 2 participants 2 messages Sep 30, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: aw86927 - Fix error code in probe()

Fix this copy and paste bug. Return "err" instead of PTR_ERR(haptics->regmap).

Fixes 52e06d564ce6 ("Input: aw86927 - add driver for Awinic AW86927")
---
 drivers/input/misc/aw86927.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/input/misc/aw86927.c +1 -2
index a0c88a7e1e1c..8ad361239cfe 100644
@@ -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);
Signature · 1 line
2.51.0
maintainer Applied
#1 lore raw
Quoted 5 lines · Dan Carpenter

Fix this copy and paste bug. Return "err" instead of PTR_ERR(haptics->regmap).

Fixes 52e06d564ce6 ("Input: aw86927 - add driver for Awinic AW86927")

Applied, thank you.

Signature · 1 line
Dmitry