From: Mauro Carvalho Chehab Date: Sat, 27 Oct 2012 17:58:45 +0000 (-0300) Subject: [media] go7007-v4l2: warning fix: index is unsigned, so it will never be below 0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=902e4575c3f7f5e989e4520a549b309dfb40a77c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] go7007-v4l2: warning fix: index is unsigned, so it will never 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 --- diff --git a/drivers/staging/media/go7007/go7007-v4l2.c b/drivers/staging/media/go7007/go7007-v4l2.c index 980371b02749..a78133b67de2 100644 --- a/drivers/staging/media/go7007/go7007-v4l2.c +++ b/drivers/staging/media/go7007/go7007-v4l2.c @@ -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];