Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138359
b: refs/heads/master
c: e33ee31
h: refs/heads/master
i:
  138357: 4f4c646
  138355: 97b7779
  138351: b9f2256
v: v3
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent ab6acef commit e251818
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 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: 4f5a7444baaabfa93cfd5d7c8f7e021ea5eaa861
refs/heads/master: e33ee31ac39620c2f91bd8c057982f94a31df958
14 changes: 2 additions & 12 deletions trunk/drivers/media/video/cafe_ccic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,8 +1151,6 @@ static int cafe_vidioc_reqbufs(struct file *filp, void *priv,
* Make sure it's something we can do. User pointers could be
* implemented without great pain, but that's not been done yet.
*/
if (req->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
if (req->memory != V4L2_MEMORY_MMAP)
return -EINVAL;
/*
Expand Down Expand Up @@ -1216,9 +1214,7 @@ static int cafe_vidioc_querybuf(struct file *filp, void *priv,
int ret = -EINVAL;

mutex_lock(&cam->s_mutex);
if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
goto out;
if (buf->index < 0 || buf->index >= cam->n_sbufs)
if (buf->index >= cam->n_sbufs)
goto out;
*buf = cam->sb_bufs[buf->index].v4lbuf;
ret = 0;
Expand All @@ -1236,9 +1232,7 @@ static int cafe_vidioc_qbuf(struct file *filp, void *priv,
unsigned long flags;

mutex_lock(&cam->s_mutex);
if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
goto out;
if (buf->index < 0 || buf->index >= cam->n_sbufs)
if (buf->index >= cam->n_sbufs)
goto out;
sbuf = cam->sb_bufs + buf->index;
if (sbuf->v4lbuf.flags & V4L2_BUF_FLAG_QUEUED) {
Expand Down Expand Up @@ -1269,8 +1263,6 @@ static int cafe_vidioc_dqbuf(struct file *filp, void *priv,
unsigned long flags;

mutex_lock(&cam->s_mutex);
if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
goto out_unlock;
if (cam->state != S_STREAMING)
goto out_unlock;
if (list_empty(&cam->sb_full) && filp->f_flags & O_NONBLOCK) {
Expand Down Expand Up @@ -1503,8 +1495,6 @@ static int cafe_vidioc_enum_fmt_vid_cap(struct file *filp,
struct cafe_camera *cam = priv;
int ret;

if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
mutex_lock(&cam->s_mutex);
ret = sensor_call(cam, video, enum_fmt, fmt);
mutex_unlock(&cam->s_mutex);
Expand Down

0 comments on commit e251818

Please sign in to comment.