diff options
author | Dan Carpenter <error27@gmail.com> | 2010-08-09 10:06:47 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-08-10 08:37:37 -0700 |
commit | f1b50760a7e3d69ef5d62f294e51300dd206ea05 (patch) | |
tree | a95284eb490ec2c2f60192ca60895adeec20b63e /drivers/input | |
parent | 22462d9fcf5b29184716aca486058943b2d6995f (diff) | |
download | op-kernel-dev-f1b50760a7e3d69ef5d62f294e51300dd206ea05.zip op-kernel-dev-f1b50760a7e3d69ef5d62f294e51300dd206ea05.tar.gz |
Input: cy8ctmg100_ts - signedness bug
"ret" should be signed here or the error handling doesn't work.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/cy8ctmg110_ts.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c index 4eb7df0..5ec0946 100644 --- a/drivers/input/touchscreen/cy8ctmg110_ts.c +++ b/drivers/input/touchscreen/cy8ctmg110_ts.c @@ -75,7 +75,7 @@ static int cy8ctmg110_write_regs(struct cy8ctmg110 *tsc, unsigned char reg, unsigned char len, unsigned char *value) { struct i2c_client *client = tsc->client; - unsigned int ret; + int ret; unsigned char i2c_data[6]; BUG_ON(len > 5); @@ -86,7 +86,7 @@ static int cy8ctmg110_write_regs(struct cy8ctmg110 *tsc, unsigned char reg, ret = i2c_master_send(client, i2c_data, len + 1); if (ret != 1) { dev_err(&client->dev, "i2c write data cmd failed\n"); - return ret; + return ret ? ret : -EIO; } return 0; @@ -96,7 +96,7 @@ static int cy8ctmg110_read_regs(struct cy8ctmg110 *tsc, unsigned char *data, unsigned char len, unsigned char cmd) { struct i2c_client *client = tsc->client; - unsigned int ret; + int ret; struct i2c_msg msg[2] = { /* first write slave position to i2c devices */ { client->addr, 0, 1, &cmd }, |