diff --git a/drivers/input/keyboard/cap11xx.c b/drivers/input/keyboard/cap11xx.c index 2447c1ae2166..485d8ba97723 100644 --- a/drivers/input/keyboard/cap11xx.c +++ b/drivers/input/keyboard/cap11xx.c @@ -512,7 +512,7 @@ static int cap11xx_i2c_probe(struct i2c_client *i2c_client) error = regmap_read(priv->regmap, CAP11XX_REG_PRODUCT_ID, &val); if (error) - return error; + return dev_err_probe(dev, error, "Failed to read product ID\n"); if (val != cap->product_id) { dev_err(dev, "Product ID: Got 0x%02x, expected 0x%02x\n", @@ -522,7 +522,7 @@ static int cap11xx_i2c_probe(struct i2c_client *i2c_client) error = regmap_read(priv->regmap, CAP11XX_REG_MANUFACTURER_ID, &val); if (error) - return error; + return dev_err_probe(dev, error, "Failed to read manufacturer ID\n"); if (val != CAP11XX_MANUFACTURER_ID) { dev_err(dev, "Manufacturer ID: Got 0x%02x, expected 0x%02x\n", @@ -531,11 +531,8 @@ static int cap11xx_i2c_probe(struct i2c_client *i2c_client) } error = regmap_read(priv->regmap, CAP11XX_REG_REVISION, &rev); - if (error < 0) - return error; - - dev_info(dev, "CAP11XX detected, model %s, revision 0x%02x\n", - id->name, rev); + if (error) + return dev_err_probe(dev, error, "Failed to read revision\n"); priv->model = cap;