Skip to content

Commit d655a68

Browse files
Dan Carpenterdtor
authored andcommitted
Input: aw86927 - fix error code in probe()
Fix this copy and paste bug. Return "err" instead of PTR_ERR(haptics->regmap). Fixes: 52e06d5 ("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>
1 parent db74430 commit d655a68

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/input/misc/aw86927.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,8 +759,7 @@ static int aw86927_probe(struct i2c_client *client)
759759
/* Software reset */
760760
err = regmap_write(haptics->regmap, AW86927_RSTCFG_REG, AW86927_RSTCFG_SOFTRST);
761761
if (err)
762-
return dev_err_probe(haptics->dev, PTR_ERR(haptics->regmap),
763-
"Failed Software reset\n");
762+
return dev_err_probe(haptics->dev, err, "Failed Software reset\n");
764763

765764
/* Wait ~3ms until I2C is accessible */
766765
usleep_range(3000, 3500);

0 commit comments

Comments
 (0)