提交 e4104710 编写于 作者: A Axel Lin 提交者: David S. Miller

bbc_i2c: Remove unneeded err variable

Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册