summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane <gnome42@gmail.com>2008-09-14 09:17:46 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-05 04:09:24 +0200
commit05d3c1e2fb95d3233f6ec0f1d4b9bb07655636b2 (patch)
tree9fbe027612b987d9595996ef98fc0ca3f557306f
parentV4L/DVB (9053): fix buffer overflow in uvc-video (diff)
downloadlinux-05d3c1e2fb95d3233f6ec0f1d4b9bb07655636b2.tar.xz
linux-05d3c1e2fb95d3233f6ec0f1d4b9bb07655636b2.zip
V4L/DVB (9075): gspca: Bad check of returned status in i2c_read() spca561.
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>
-rw-r--r--drivers/media/video/gspca/spca561.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c
index cfbc9ebc5c5d..95fcfcb9e31b 100644
--- a/drivers/media/video/gspca/spca561.c
+++ b/drivers/media/video/gspca/spca561.c
@@ -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)