aboutsummaryrefslogtreecommitdiff
path: root/drivers/sbus
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-21 21:42:20 +0000
committerDavid S. Miller <davem@davemloft.net>2011-12-04 10:46:57 -0800
commite410471029ba99e85af5e2a1e7e747c7b4de2bc3 (patch)
tree51897a3534d9710bc7ebd706fa238abb64b801cf /drivers/sbus
parentf0a4cf31017ac8179a2fe295c1bd8e821d7674f4 (diff)
downloadvexpress-lsk-e410471029ba99e85af5e2a1e7e747c7b4de2bc3.tar.gz
bbc_i2c: Remove unneeded err variable
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/sbus')
-rw-r--r--drivers/sbus/char/bbc_i2c.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index 5f94d22c491..a0d1399577c 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -233,13 +233,9 @@ int bbc_i2c_write_buf(struct bbc_i2c_client *client,
int ret = 0;
while (len > 0) {
- int err = bbc_i2c_writeb(client, *buf, off);
-
- if (err < 0) {
- ret = err;
+ ret = bbc_i2c_writeb(client, *buf, off);
+ if (ret < 0)
break;
- }
-
len--;
buf++;
off++;
@@ -253,11 +249,9 @@ int bbc_i2c_read_buf(struct bbc_i2c_client *client,
int ret = 0;
while (len > 0) {
- int err = bbc_i2c_readb(client, buf, off);
- if (err < 0) {
- ret = err;
+ ret = bbc_i2c_readb(client, buf, off);
+ if (ret < 0)
break;
- }
len--;
buf++;
off++;