diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-29 21:32:08 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-29 21:32:08 -0200 |
commit | e264d04344361dda7945915fcab202bef964fe4f (patch) | |
tree | 58f67db497f9d06c73798cbe9e28f47abf83ab2d | |
parent | cccb1ce4270b85c9c6fb64557d0b662b6a30878c (diff) | |
download | mediapointer-dvb-s2-e264d04344361dda7945915fcab202bef964fe4f.tar.gz mediapointer-dvb-s2-e264d04344361dda7945915fcab202bef964fe4f.tar.bz2 |
Fix the frame->grabstate update in read() entry point.
From: Thierry MERLE <thierry.merle@free.fr>
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>
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-video.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c index 4707b4462..df70b0712 100644 --- a/linux/drivers/media/video/usbvision/usbvision-video.c +++ b/linux/drivers/media/video/usbvision/usbvision-video.c @@ -1134,7 +1134,6 @@ static ssize_t usbvision_v4l2_read(struct file *file, char *buf, #endif unsigned long lock_flags; - int frmx = -1; int ret,i; struct usbvision_frame *frame; @@ -1209,7 +1208,7 @@ static ssize_t usbvision_v4l2_read(struct file *file, char *buf, frame->bytes_read = 0; /* Mark it as available to be used again. */ - usbvision->frame[frmx].grabstate = FrameState_Unused; + frame->grabstate = FrameState_Unused; /* } */ return count; |