Skip to content

Commit

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

drivers/staging/media/go7007/go7007-v4l2.c: In function 'vidioc_qbuf':
drivers/staging/media/go7007/go7007-v4l2.c:815: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 067d851 commit 902e457
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/media/go7007/go7007-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
return retval;

mutex_lock(&gofh->lock);
if (buf->index < 0 || buf->index >= gofh->buf_count)
if (buf->index >= gofh->buf_count)
goto unlock_and_return;

gobuf = &gofh->bufs[buf->index];
Expand Down

0 comments on commit 902e457

Please sign in to comment.