diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-21 22:42:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-04 19:46:57 +0100 |
commit | e410471029ba99e85af5e2a1e7e747c7b4de2bc3 (patch) | |
tree | 51897a3534d9710bc7ebd706fa238abb64b801cf | |
parent | sparc: Use kmemdup rather than duplicating its implementation (diff) | |
download | linux-e410471029ba99e85af5e2a1e7e747c7b4de2bc3.tar.xz linux-e410471029ba99e85af5e2a1e7e747c7b4de2bc3.zip |
bbc_i2c: Remove unneeded err variable
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-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++; |