diff options
author | Michael Krufky <mkrufky@kernellabs.com> | 2009-09-15 11:14:17 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@kernellabs.com> | 2009-09-15 11:14:17 -0400 |
commit | b0d1e983e98ec9b72146c16d08b3409a418c62df (patch) | |
tree | b61e50f54f11599f31b476c477a69883597f5fad /linux/drivers/media/video/cpia2/cpia2_v4l.c | |
parent | 2c16279409d239adbbc884a308e71264ea02ef46 (diff) | |
parent | 219fe38bd79dab42db83cacc1f5444d0e27fa8ea (diff) | |
download | mediapointer-dvb-s2-b0d1e983e98ec9b72146c16d08b3409a418c62df.tar.gz mediapointer-dvb-s2-b0d1e983e98ec9b72146c16d08b3409a418c62df.tar.bz2 |
merge: ~mkrufky/tda18271
From: Michael Krufky <mkrufky@kernellabs.com>
Priority: normal
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Diffstat (limited to 'linux/drivers/media/video/cpia2/cpia2_v4l.c')
-rw-r--r-- | linux/drivers/media/video/cpia2/cpia2_v4l.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/linux/drivers/media/video/cpia2/cpia2_v4l.c b/linux/drivers/media/video/cpia2/cpia2_v4l.c index 9c25894fd..0b4a8f309 100644 --- a/linux/drivers/media/video/cpia2/cpia2_v4l.c +++ b/linux/drivers/media/video/cpia2/cpia2_v4l.c @@ -37,6 +37,7 @@ #include <linux/sched.h> #include <linux/slab.h> #include <linux/init.h> +#include <linux/videodev.h> #include <media/v4l2-ioctl.h> #include "cpia2.h" @@ -1063,7 +1064,7 @@ static int ioctl_querymenu(void *arg,struct camera_data *cam) switch(m->id) { case CPIA2_CID_FLICKER_MODE: - if(m->index < 0 || m->index >= NUM_FLICKER_CONTROLS) + if (m->index >= NUM_FLICKER_CONTROLS) return -EINVAL; strcpy(m->name, flicker_controls[m->index].name); @@ -1081,14 +1082,14 @@ static int ioctl_querymenu(void *arg,struct camera_data *cam) maximum = i; } } - if(m->index < 0 || m->index > maximum) + if (m->index > maximum) return -EINVAL; strcpy(m->name, framerate_controls[m->index].name); break; } case CPIA2_CID_LIGHTS: - if(m->index < 0 || m->index >= NUM_LIGHTS_CONTROLS) + if (m->index >= NUM_LIGHTS_CONTROLS) return -EINVAL; strcpy(m->name, lights_controls[m->index].name); |