aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/omap24xxcam.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/omap24xxcam.c')
-rw-r--r--drivers/media/video/omap24xxcam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c
index b189fe63394..ce76d952e16 100644
--- a/drivers/media/video/omap24xxcam.c
+++ b/drivers/media/video/omap24xxcam.c
@@ -1405,7 +1405,7 @@ static int omap24xxcam_mmap_buffers(struct file *file,
}
size = 0;
- for (i = first; i <= last; i++) {
+ for (i = first; i <= last && i < VIDEO_MAX_FRAME; i++) {
struct videobuf_dmabuf *dma = videobuf_to_dma(vbq->bufs[i]);
for (j = 0; j < dma->sglen; j++) {