summaryrefslogtreecommitdiff
path: root/drivers/media/video/gspca/sonixb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/sonixb.c')
-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)
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;
}