Skip to content

Commit

Permalink
[media] gspca: warning fix: index is unsigned, so it will never be be…
Browse files Browse the repository at this point in the history
…low 0

drivers/media/usb/gspca/gspca.c: In function 'vidioc_querybuf':
drivers/media/usb/gspca/gspca.c:1590:6: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Oct 28, 2012
1 parent 9825f37 commit 3a70c3f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/usb/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 3a70c3f

Please sign in to comment.