diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-27 21:23:03 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-28 10:38:51 +0100 |
commit | 1ab90587029b821ed47db9df8d79a5ebe49a02a8 (patch) | |
tree | 94c23eef0e5f8dd245ff5e898e7cd621f0c5cce8 /drivers/media/usb/tlg2300 | |
parent | [media] m2m-deinterlace: remove unused vars (diff) | |
download | linux-1ab90587029b821ed47db9df8d79a5ebe49a02a8.tar.xz linux-1ab90587029b821ed47db9df8d79a5ebe49a02a8.zip |
[media] tlg2300: index is unsigned, so never below zero
drivers/media/usb/tlg2300/pd-video.c:891:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/media/usb/tlg2300/pd-video.c:926:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
Cc: Huang Shijie <shijie8@gmail.com>
Cc: Kang Yong <kangyong@telegent.com>
Cc: Zhang Xiaobing <xbzhang@telegent.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/tlg2300')
-rw-r--r-- | drivers/media/usb/tlg2300/pd-video.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/usb/tlg2300/pd-video.c b/drivers/media/usb/tlg2300/pd-video.c index 1f448ac7a496..3082bfa9b2c5 100644 --- a/drivers/media/usb/tlg2300/pd-video.c +++ b/drivers/media/usb/tlg2300/pd-video.c @@ -888,7 +888,7 @@ static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *in) { struct front_face *front = fh; - if (in->index < 0 || in->index >= POSEIDON_INPUTS) + if (in->index >= POSEIDON_INPUTS) return -EINVAL; strcpy(in->name, pd_inputs[in->index].name); in->type = V4L2_INPUT_TYPE_TUNER; @@ -923,7 +923,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int i) struct poseidon *pd = front->pd; s32 ret, cmd_status; - if (i < 0 || i >= POSEIDON_INPUTS) + if (i >= POSEIDON_INPUTS) return -EINVAL; ret = send_set_req(pd, SGNL_SRC_SEL, pd_inputs[i].tlg_src, &cmd_status); |