aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca
diff options
context:
space:
mode:
authorAndoni Zubimendi <andoni.zubimendi@gmail.com>2008-07-16 07:40:30 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:27:01 -0400
commitb7474cf9f693a83c9a64c8504a08823a34994a2e (patch)
tree8b77fa1c2d84f5542124a7f6aabcfc48638014be /drivers/media/video/gspca
parent794af52a4ce5279c52f1467448b9e672a7db37f0 (diff)
V4L/DVB (8361): gspca: Bad check of i2c write to sn9c10x.
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca')
-rw-r--r--drivers/media/video/gspca/sonixb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c
index 054ce4e3ece7..80879bf3188f 100644
--- a/drivers/media/video/gspca/sonixb.c
+++ b/drivers/media/video/gspca/sonixb.c
@@ -456,8 +456,11 @@ static int i2c_w(struct gspca_dev *gspca_dev, const __u8 *buffer)
456 while (retry--) { 456 while (retry--) {
457 msleep(10); 457 msleep(10);
458 reg_r(gspca_dev, 0x08); 458 reg_r(gspca_dev, 0x08);
459 if (gspca_dev->usb_buf[0] == 4) 459 if (gspca_dev->usb_buf[0] & 0x04) {
460 if (gspca_dev->usb_buf[0] & 0x08)
461 return -1;
460 return 0; 462 return 0;
463 }
461 } 464 }
462 return -1; 465 return -1;
463} 466}