diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-07-16 10:40:30 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-07-16 10:40:30 +0200 |
commit | 576eb69e32e0f368412e19b6e131f5bc1081ef22 (patch) | |
tree | 69e58211d48a0914e9c7ee44f42a7b3ef4e39315 /linux/drivers/media | |
parent | 84c553d8941a27b23a52511921babc4bfa112d93 (diff) | |
download | mediapointer-dvb-s2-576eb69e32e0f368412e19b6e131f5bc1081ef22.tar.gz mediapointer-dvb-s2-576eb69e32e0f368412e19b6e131f5bc1081ef22.tar.bz2 |
gspca: Bad check of i2c write to sn9c10x.
From: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/gspca/sonixb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/linux/drivers/media/video/gspca/sonixb.c b/linux/drivers/media/video/gspca/sonixb.c index 35dbaff10..edec35bd0 100644 --- a/linux/drivers/media/video/gspca/sonixb.c +++ b/linux/drivers/media/video/gspca/sonixb.c @@ -482,8 +482,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; } |