diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-27 17:55:20 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-28 09:38:36 (GMT) |
commit | 3a70c3fbcd546bad2314492700dd8d5c36023eb1 (patch) | |
tree | 67e5fca86725dfcd974c7c69fb05530a3c60d52a /drivers/media | |
parent | 9825f376533c8550dc2f8d78a5a9af6612490a1a (diff) | |
download | linux-fsl-qoriq-3a70c3fbcd546bad2314492700dd8d5c36023eb1.tar.xz |
[media] gspca: warning fix: index is unsigned, so it will never be below 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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/usb/gspca/gspca.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index a2b9341..e0a431b 100644 --- a/drivers/media/usb/gspca/gspca.c +++ b/drivers/media/usb/gspca/gspca.c @@ -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]; |