[media] gspca: Fix a warning for using len before filling it
authorMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 27 Dec 2010 15:00:03 +0000 (12:00 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 29 Dec 2010 10:17:14 +0000 (08:17 -0200)
The check for status errors is now before the check for len. That's
ok. However, the error printk's for the status error prints the URB
length. This generates this error:

drivers/media/video/gspca/gspca.c: In function ‘fill_frame’:
drivers/media/video/gspca/gspca.c:305:9: warning: ‘len’ may be used uninitialized in this function

The fix is as simple as moving the len init to happen before the checks.

Cc: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

No differences found