The Coverity checker spotted that in usbvision_v4l2_read(), the variable
"frmx" is never assigned any value different from -1, but it's used an
an array index in "usbvision->frame[frmx]".
Thanks to Adrian Bunk <bunk@stusta.de> for warning about that.
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
int noblock = file->f_flags & O_NONBLOCK;
unsigned long lock_flags;
- int frmx = -1;
int ret,i;
struct usbvision_frame *frame;
frame->bytes_read = 0;
/* Mark it as available to be used again. */
- usbvision->frame[frmx].grabstate = FrameState_Unused;
+ frame->grabstate = FrameState_Unused;
/* } */
return count;