bbc_i2c: Remove unneeded err variable
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
f0a4cf3101
commit
e410471029
@@ -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,
|
|||||||
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++;
|
||||||
|
Reference in New Issue
Block a user