projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fea2021
)
Input: cy8ctmg110_ts - fix checking return value of i2c_master_send
author
Axel Lin
<axel.lin@gmail.com>
Wed, 13 Jul 2011 07:03:36 +0000
(
00:03
-0700)
committer
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Wed, 13 Jul 2011 07:08:20 +0000
(
00:08
-0700)
i2c_master_send returns negative errno, or else the number of bytes written.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/cy8ctmg110_ts.c
patch
|
blob
|
history
diff --git
a/drivers/input/touchscreen/cy8ctmg110_ts.c
b/drivers/input/touchscreen/cy8ctmg110_ts.c
index a93c5c26ab3fa7d858238d13b1c27e919958c8c9..b3fdd1361c36bd90f3c08295e060b9c6bae20cd7 100644
(file)
--- 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,
memcpy(i2c_data + 1, value, len);
ret = i2c_master_send(client, i2c_data, len + 1);
- if (ret != 1) {
+ if (ret !=
len +
1) {
dev_err(&client->dev, "i2c write data cmd failed\n");
- return ret ? ret : -EIO;
+ return ret
< 0
? ret : -EIO;
}
return 0;