This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media-tree.git tree:

Subject: V4L/DVB: cx23885: i2c_wait_done returns 0 or 1, don't check for < 0 
return value
Author:  Jean Delvare <[email protected]>
Date:    Sun Jul 18 17:05:17 2010 -0300

Function i2c_wait_done() never returns negative values, so there is no
point in checking for them.

Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Andy Walls <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/video/cx23885/cx23885-i2c.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

---

http://git.linuxtv.org/media-tree.git?a=commitdiff;h=b15273737f11df03ebdc15b75f18486f0e354830

diff --git a/drivers/media/video/cx23885/cx23885-i2c.c 
b/drivers/media/video/cx23885/cx23885-i2c.c
index afb8d6f..1a39148 100644
--- a/drivers/media/video/cx23885/cx23885-i2c.c
+++ b/drivers/media/video/cx23885/cx23885-i2c.c
@@ -120,10 +120,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
        cx_write(bus->reg_wdata, wdata);
        cx_write(bus->reg_ctrl, ctrl);
 
-       retval = i2c_wait_done(i2c_adap);
-       if (retval < 0)
-               goto err;
-       if (retval == 0)
+       if (!i2c_wait_done(i2c_adap))
                goto eio;
        if (!i2c_slave_did_ack(i2c_adap)) {
                retval = -ENXIO;
@@ -149,10 +146,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
                cx_write(bus->reg_wdata, wdata);
                cx_write(bus->reg_ctrl, ctrl);
 
-               retval = i2c_wait_done(i2c_adap);
-               if (retval < 0)
-                       goto err;
-               if (retval == 0)
+               if (!i2c_wait_done(i2c_adap))
                        goto eio;
                if (i2c_debug) {
                        dprintk(1, " %02x", msg->buf[cnt]);
@@ -213,10 +207,7 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap,
                cx_write(bus->reg_addr, msg->addr << 25);
                cx_write(bus->reg_ctrl, ctrl);
 
-               retval = i2c_wait_done(i2c_adap);
-               if (retval < 0)
-                       goto err;
-               if (retval == 0)
+               if (!i2c_wait_done(i2c_adap))
                        goto eio;
                if (cnt == 0 && !i2c_slave_did_ack(i2c_adap)) {
                        retval = -ENXIO;

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to