Commit 05d3c1e2 authored by Shane's avatar Shane Committed by Mauro Carvalho Chehab

V4L/DVB (9075): gspca: Bad check of returned status in i2c_read() spca561.

This makes auto gain functional on 04fc:0561.
Signed-off-by: default avatarShane <gnome42@gmail.com>
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent fe6c700f
...@@ -225,7 +225,7 @@ static int i2c_read(struct gspca_dev *gspca_dev, __u16 reg, __u8 mode) ...@@ -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)); reg_w_val(gspca_dev->dev, 0x8802, (mode | 0x01));
do { do {
reg_r(gspca_dev, 0x8803, 1); reg_r(gspca_dev, 0x8803, 1);
if (!gspca_dev->usb_buf) if (!gspca_dev->usb_buf[0])
break; break;
} while (--retry); } while (--retry);
if (retry == 0) if (retry == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment