V4L/DVB (6625): CXUSB: i2c transfer failure notification
authorChris Pascoe <c.pascoe@itee.uq.edu.au>
Mon, 19 Nov 2007 05:48:27 +0000 (02:48 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:02:20 +0000 (19:02 -0200)
The i2c master_xfer routine should return a negative result if not all
transfers completed successfully.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/dvb-usb/cxusb.c

index b4a3f7b..86fbd6c 100644 (file)
@@ -132,7 +132,7 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
        }
 
        mutex_unlock(&d->i2c_mutex);
-       return i;
+       return i == num ? num : -EREMOTEIO;
 }
 
 static u32 cxusb_i2c_func(struct i2c_adapter *adapter)