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>
This commit is contained in:
parent
794af52a4c
commit
b7474cf9f6
@ -456,8 +456,11 @@ static int i2c_w(struct gspca_dev *gspca_dev, const __u8 *buffer)
|
||||
while (retry--) {
|
||||
msleep(10);
|
||||
reg_r(gspca_dev, 0x08);
|
||||
if (gspca_dev->usb_buf[0] == 4)
|
||||
if (gspca_dev->usb_buf[0] & 0x04) {
|
||||
if (gspca_dev->usb_buf[0] & 0x08)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user