* [PATCH] bbc_i2c: Remove unneeded err variable
@ 2011-11-22 7:42 Axel Lin
2011-12-04 19:00 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-11-22 7:42 UTC (permalink / raw)
To: linux-kernel; +Cc: David S. Miller, sparclinux
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
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 5f94d22..a0d1399 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,
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++;
@@ -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++;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bbc_i2c: Remove unneeded err variable
2011-11-22 7:42 [PATCH] bbc_i2c: Remove unneeded err variable Axel Lin
@ 2011-12-04 19:00 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-12-04 19:00 UTC (permalink / raw)
To: axel.lin; +Cc: linux-kernel, sparclinux
From: Axel Lin <axel.lin@gmail.com>
Date: Tue, 22 Nov 2011 15:42:20 +0800
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-04 19:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22 7:42 [PATCH] bbc_i2c: Remove unneeded err variable Axel Lin
2011-12-04 19:00 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox