[media] go7007-v4l2: warning fix: index is unsigned, so it will never be below 0
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 27 Oct 2012 17:58:45 +0000 (14:58 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 28 Oct 2012 09:38:38 +0000 (07:38 -0200)
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>
drivers/staging/media/go7007/go7007-v4l2.c

index 980371b0274966b45b71a38621f4452e8bf0cf72..a78133b67de2049f80190d3a2672c6fadbcaa68a 100644 (file)
@@ -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];