Commit b7474cf9 authored by Andoni Zubimendi's avatar Andoni Zubimendi Committed by Mauro Carvalho Chehab

V4L/DVB (8361): gspca: Bad check of i2c write to sn9c10x.

Signed-off-by: default avatarAndoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 794af52a
......@@ -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;
}
......
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