diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2008-09-02 14:02:50 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-09-05 01:27:51 +0400 |
commit | 8561098ff11d21f1a6a9a01fae2e68653928dbb5 (patch) | |
tree | d7b96f9b46fc9f924a52906b5f80d2e77622bb5b /drivers/media/video/gspca/spca561.c | |
parent | 748c7f80acc266a54ade4d6863229402fd3cd363 (diff) | |
download | linux-8561098ff11d21f1a6a9a01fae2e68653928dbb5.tar.xz |
V4L/DVB (8881): gspca: After 'while (retry--) {...}', retry will be -1 but not 0.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/spca561.c')
-rw-r--r-- | drivers/media/video/gspca/spca561.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c index 1c29c279a982..cfbc9ebc5c5d 100644 --- a/drivers/media/video/gspca/spca561.c +++ b/drivers/media/video/gspca/spca561.c @@ -223,11 +223,11 @@ static int i2c_read(struct gspca_dev *gspca_dev, __u16 reg, __u8 mode) reg_w_val(gspca_dev->dev, 0x8804, 0x92); reg_w_val(gspca_dev->dev, 0x8801, reg); reg_w_val(gspca_dev->dev, 0x8802, (mode | 0x01)); - while (retry--) { + do { reg_r(gspca_dev, 0x8803, 1); if (!gspca_dev->usb_buf) break; - } + } while (--retry); if (retry == 0) return -1; reg_r(gspca_dev, 0x8800, 1); |