diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-21 16:42:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-04 13:46:57 -0500 |
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, | |||
233 | int ret = 0; | 233 | int ret = 0; |
234 | 234 | ||
235 | while (len > 0) { | 235 | while (len > 0) { |
236 | int err = bbc_i2c_writeb(client, *buf, off); | 236 | ret = bbc_i2c_writeb(client, *buf, off); |
237 | 237 | if (ret < 0) | |
238 | if (err < 0) { | ||
239 | ret = err; | ||
240 | break; | 238 | break; |
241 | } | ||
242 | |||
243 | len--; | 239 | len--; |
244 | buf++; | 240 | buf++; |
245 | off++; | 241 | off++; |
@@ -253,11 +249,9 @@ int bbc_i2c_read_buf(struct bbc_i2c_client *client, | |||
253 | int ret = 0; | 249 | int ret = 0; |
254 | 250 | ||
255 | while (len > 0) { | 251 | while (len > 0) { |
256 | int err = bbc_i2c_readb(client, buf, off); | 252 | ret = bbc_i2c_readb(client, buf, off); |
257 | if (err < 0) { | 253 | if (ret < 0) |
258 | ret = err; | ||
259 | break; | 254 | break; |
260 | } | ||
261 | len--; | 255 | len--; |
262 | buf++; | 256 | buf++; |
263 | off++; | 257 | off++; |