diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-27 21:55:20 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-28 13:38:36 +0400 |
commit | 3a70c3fbcd546bad2314492700dd8d5c36023eb1 (patch) | |
tree | 67e5fca86725dfcd974c7c69fb05530a3c60d52a /drivers/media/usb/gspca/gspca.c | |
parent | 9825f376533c8550dc2f8d78a5a9af6612490a1a (diff) | |
download | linux-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/usb/gspca/gspca.c')
-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 a2b934146ebf..e0a431bb0d42 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]; |