]> www.infradead.org Git - users/hch/misc.git/commitdiff
Input: aw86927 - fix error code in probe()
authorDan Carpenter <dan.carpenter@linaro.org>
Tue, 30 Sep 2025 12:25:33 +0000 (15:25 +0300)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 30 Sep 2025 20:19:53 +0000 (13:19 -0700)
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>
Link: https://lore.kernel.org/r/aNvMPTnOovdBitdP@stanley.mountain
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/aw86927.c

index a0c88a7e1e1c95bd9ae8eda69d12700250375c66..8ad361239cfe3a888628b15e4dbdeed0c9ca3d1a 100644 (file)
@@ -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);