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: [media] cx231xx: handle errors at read_eeprom()
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Sun Jul 27 16:27:30 2014 -0300

Fix the following warnings:
        drivers/media/usb/cx231xx/cx231xx-cards.c: In function 'read_eeprom':
        drivers/media/usb/cx231xx/cx231xx-cards.c:979:6: warning: variable 
'ret' set but not used [-Wunused-but-set-variable]

Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/usb/cx231xx/cx231xx-cards.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=1f97947c15a8d2bc21917463eb72d7f8685e3a86

diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c 
b/drivers/media/usb/cx231xx/cx231xx-cards.c
index 5812c63..8039b76 100644
--- a/drivers/media/usb/cx231xx/cx231xx-cards.c
+++ b/drivers/media/usb/cx231xx/cx231xx-cards.c
@@ -991,13 +991,20 @@ static int read_eeprom(struct cx231xx *dev, u8 *eedata, 
int len)
 
        /* start reading at offset 0 */
        ret = i2c_transfer(&dev->i2c_bus[1].i2c_adap, &msg_write, 1);
+       if (ret < 0) {
+               cx231xx_err("Can't read eeprom\n");
+               return ret;
+       }
 
        while (len_todo > 0) {
                msg_read.len = (len_todo > 64) ? 64 : len_todo;
                msg_read.buf = eedata_cur;
 
                ret = i2c_transfer(&dev->i2c_bus[1].i2c_adap, &msg_read, 1);
-
+               if (ret < 0) {
+                       cx231xx_err("Can't read eeprom\n");
+                       return ret;
+               }
                eedata_cur += msg_read.len;
                len_todo -= msg_read.len;
        }

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

Reply via email to