diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/cy8ctmg110_ts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c index a93c5c26ab3f..b3fdd1361c36 100644 --- a/drivers/input/touchscreen/cy8ctmg110_ts.c +++ b/drivers/input/touchscreen/cy8ctmg110_ts.c | |||
@@ -84,9 +84,9 @@ static int cy8ctmg110_write_regs(struct cy8ctmg110 *tsc, unsigned char reg, | |||
84 | memcpy(i2c_data + 1, value, len); | 84 | memcpy(i2c_data + 1, value, len); |
85 | 85 | ||
86 | ret = i2c_master_send(client, i2c_data, len + 1); | 86 | ret = i2c_master_send(client, i2c_data, len + 1); |
87 | if (ret != 1) { | 87 | if (ret != len + 1) { |
88 | dev_err(&client->dev, "i2c write data cmd failed\n"); | 88 | dev_err(&client->dev, "i2c write data cmd failed\n"); |
89 | return ret ? ret : -EIO; | 89 | return ret < 0 ? ret : -EIO; |
90 | } | 90 | } |
91 | 91 | ||
92 | return 0; | 92 | return 0; |