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

Dan Carpenter posted 1 patch 2 months, 2 weeks ago
drivers/input/misc/aw86927.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH next] Input: aw86927 - Fix error code in probe()
Posted by Dan Carpenter 2 months, 2 weeks ago
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
Re: [PATCH next] Input: aw86927 - Fix error code in probe()
Posted by Dmitry Torokhov 2 months, 2 weeks ago
On Tue, Sep 30, 2025 at 03:25:33PM +0300, Dan Carpenter wrote:
> 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>

Applied, thank you.

-- 
Dmitry