Commit e4104710 authored by Axel Lin's avatar Axel Lin Committed by David S. Miller

bbc_i2c: Remove unneeded err variable

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f0a4cf31
...@@ -233,13 +233,9 @@ int bbc_i2c_write_buf(struct bbc_i2c_client *client, ...@@ -233,13 +233,9 @@ int bbc_i2c_write_buf(struct bbc_i2c_client *client,
int ret = 0; int ret = 0;
while (len > 0) { while (len > 0) {
int err = bbc_i2c_writeb(client, *buf, off); ret = bbc_i2c_writeb(client, *buf, off);
if (ret < 0)
if (err < 0) {
ret = err;
break; break;
}
len--; len--;
buf++; buf++;
off++; off++;
...@@ -253,11 +249,9 @@ int bbc_i2c_read_buf(struct bbc_i2c_client *client, ...@@ -253,11 +249,9 @@ int bbc_i2c_read_buf(struct bbc_i2c_client *client,
int ret = 0; int ret = 0;
while (len > 0) { while (len > 0) {
int err = bbc_i2c_readb(client, buf, off); ret = bbc_i2c_readb(client, buf, off);
if (err < 0) { if (ret < 0)
ret = err;
break; break;
}
len--; len--;
buf++; buf++;
off++; off++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment