]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (9075): gspca: Bad check of returned status in i2c_read() spca561.
authorShane <gnome42@gmail.com>
Sun, 14 Sep 2008 07:17:46 +0000 (04:17 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 5 Oct 2008 02:09:24 +0000 (23:09 -0300)
This makes auto gain functional on 04fc:0561.

Signed-off-by: Shane <gnome42@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/spca561.c

index cfbc9ebc5c5d8f6bb6518bc352a1c0a69afe530b..95fcfcb9e31b51c8d2ce871fdae89b0096df1862 100644 (file)
@@ -225,7 +225,7 @@ static int i2c_read(struct gspca_dev *gspca_dev, __u16 reg, __u8 mode)
        reg_w_val(gspca_dev->dev, 0x8802, (mode | 0x01));
        do {
                reg_r(gspca_dev, 0x8803, 1);
-               if (!gspca_dev->usb_buf)
+               if (!gspca_dev->usb_buf[0])
                        break;
        } while (--retry);
        if (retry == 0)