mirror of
https://github.com/torvalds/linux.git
synced 2026-01-24 23:16:46 +00:00
Input: aw86927 - fix error code in probe()
Fix this copy and paste bug. Return "err" instead of
PTR_ERR(haptics->regmap).
Fixes: 52e06d564c ("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>
This commit is contained in:
committed by
Dmitry Torokhov
parent
db74430a42
commit
d655a684c2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user