diff options
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/gspca/gspca.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index a2b934146eb..e0a431bb0d4 100644 --- a/drivers/media/usb/gspca/gspca.c +++ b/drivers/media/usb/gspca/gspca.c @@ -1586,8 +1586,7 @@ static int vidioc_querybuf(struct file *file, void *priv, struct gspca_dev *gspca_dev = video_drvdata(file); struct gspca_frame *frame; - if (v4l2_buf->index < 0 - || v4l2_buf->index >= gspca_dev->nframes) + if (v4l2_buf->index >= gspca_dev->nframes) return -EINVAL; frame = &gspca_dev->frame[v4l2_buf->index]; |