diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-21 21:42:20 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-04 10:46:57 -0800 |
commit | e410471029ba99e85af5e2a1e7e747c7b4de2bc3 (patch) | |
tree | 51897a3534d9710bc7ebd706fa238abb64b801cf /drivers | |
parent | f0a4cf31017ac8179a2fe295c1bd8e821d7674f4 (diff) |
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')
-rw-r--r-- | drivers/sbus/char/bbc_i2c.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 5f94d22c491e..a0d1399577cc 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++; |