Skip to content

Commit

Permalink
[media] s2255drv: index is always positive
Browse files Browse the repository at this point in the history
drivers/media/usb/s2255/s2255drv.c:1654:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Oct 28, 2012
1 parent d3e4ea0 commit 199ab8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/usb/s2255/s2255drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,7 @@ static int vidioc_enum_frameintervals(struct file *file, void *priv,
int is_ntsc = 0;
#define NUM_FRAME_ENUMS 4
int frm_dec[NUM_FRAME_ENUMS] = {1, 2, 3, 5};
if (fe->index < 0 || fe->index >= NUM_FRAME_ENUMS)
if (fe->index >= NUM_FRAME_ENUMS)
return -EINVAL;
switch (fe->width) {
case 640:
Expand Down

0 comments on commit 199ab8f

Please sign in to comment.