diff options
Diffstat (limited to 'drivers/media/video/stk-webcam.c')
-rw-r--r-- | drivers/media/video/stk-webcam.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c index 1a6d39cbd6f3..2e5937047278 100644 --- a/drivers/media/video/stk-webcam.c +++ b/drivers/media/video/stk-webcam.c | |||
@@ -1137,7 +1137,7 @@ static int stk_vidioc_querybuf(struct file *filp, | |||
1137 | struct stk_camera *dev = priv; | 1137 | struct stk_camera *dev = priv; |
1138 | struct stk_sio_buffer *sbuf; | 1138 | struct stk_sio_buffer *sbuf; |
1139 | 1139 | ||
1140 | if (buf->index < 0 || buf->index >= dev->n_sbufs) | 1140 | if (buf->index >= dev->n_sbufs) |
1141 | return -EINVAL; | 1141 | return -EINVAL; |
1142 | sbuf = dev->sio_bufs + buf->index; | 1142 | sbuf = dev->sio_bufs + buf->index; |
1143 | *buf = sbuf->v4lbuf; | 1143 | *buf = sbuf->v4lbuf; |
@@ -1154,7 +1154,7 @@ static int stk_vidioc_qbuf(struct file *filp, | |||
1154 | if (buf->memory != V4L2_MEMORY_MMAP) | 1154 | if (buf->memory != V4L2_MEMORY_MMAP) |
1155 | return -EINVAL; | 1155 | return -EINVAL; |
1156 | 1156 | ||
1157 | if (buf->index < 0 || buf->index >= dev->n_sbufs) | 1157 | if (buf->index >= dev->n_sbufs) |
1158 | return -EINVAL; | 1158 | return -EINVAL; |
1159 | sbuf = dev->sio_bufs + buf->index; | 1159 | sbuf = dev->sio_bufs + buf->index; |
1160 | if (sbuf->v4lbuf.flags & V4L2_BUF_FLAG_QUEUED) | 1160 | if (sbuf->v4lbuf.flags & V4L2_BUF_FLAG_QUEUED) |