Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285158
b: refs/heads/master
c: d06db7e
h: refs/heads/master
v: v3
  • Loading branch information
Archit Taneja authored and Mauro Carvalho Chehab committed Nov 7, 2011
1 parent a0ed6e4 commit 6e38d05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f8770454b82c166662201a8966476f4538cbfeb
refs/heads/master: d06db7ec908869cbf79829b8cbd9a04a7c802905
6 changes: 5 additions & 1 deletion trunk/drivers/media/video/omap/omap_vout.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,10 +663,14 @@ static int omap_vout_buffer_setup(struct videobuf_queue *q, unsigned int *count,
u32 phy_addr = 0, virt_addr = 0;
struct omap_vout_device *vout = q->priv_data;
struct omapvideo_info *ovid = &vout->vid_info;
int vid_max_buf_size;

if (!vout)
return -EINVAL;

vid_max_buf_size = vout->vid == OMAP_VIDEO1 ? video1_bufsize :
video2_bufsize;

if (V4L2_BUF_TYPE_VIDEO_OUTPUT != q->type)
return -EINVAL;

Expand All @@ -689,7 +693,7 @@ static int omap_vout_buffer_setup(struct videobuf_queue *q, unsigned int *count,
video1_numbuffers : video2_numbuffers;

/* Check the size of the buffer */
if (*size > vout->buffer_size) {
if (*size > vid_max_buf_size) {
v4l2_err(&vout->vid_dev->v4l2_dev,
"buffer allocation mismatch [%u] [%u]\n",
*size, vout->buffer_size);
Expand Down

0 comments on commit 6e38d05

Please sign in to comment.