Skip to content

Commit

Permalink
bbc_i2c: Remove unneeded err variable
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Axel Lin authored and David S. Miller committed Dec 4, 2011
1 parent f0a4cf3 commit e410471
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions drivers/sbus/char/bbc_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand All @@ -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++;
Expand Down

0 comments on commit e410471

Please sign in to comment.