提交 b7474cf9 编写于 作者: A Andoni Zubimendi 提交者: Mauro Carvalho Chehab

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

Signed-off-by: NAndoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: NJean-Francois Moine <moinejf@free.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册