Input: aw86927 - Fix error code in probe()
Subsystems (3)
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")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/input/misc/aw86927.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/input/misc/aw86927.c +1 -2
@@ -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
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")Signed-off-by Dan Carpenter <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry