From b6846f8378e51e39a605b395c560986011bde203 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 2 May 2009 19:38:47 +0000 Subject: V4L/DVB: cleanup redundant tests on unsigned From: Roel Kluin Remove redundant tests on unsigned. Signed-off-by: Roel Kluin Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/dvb/ttpci/av7110_v4l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb/ttpci/av7110_v4l.c') diff --git a/linux/drivers/media/dvb/ttpci/av7110_v4l.c b/linux/drivers/media/dvb/ttpci/av7110_v4l.c index 2210cff73..ce64c6214 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c @@ -458,7 +458,7 @@ static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i) dprintk(2, "VIDIOC_ENUMINPUT: %d\n", i->index); if (av7110->analog_tuner_flags) { - if (i->index < 0 || i->index >= 4) + if (i->index >= 4) return -EINVAL; } else { if (i->index != 0) -- cgit v1.2.3 From a9ce895e4fbe314a0e7d2b967f576367a8c38acb Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Thu, 2 Jul 2009 16:09:25 -0300 Subject: remove redundant tests on unsigned From: Roel Kluin input, inp and i are unsigned. When negative they are wrapped and caught by the other test. Priority: normal Signed-off-by: Roel Kluin CC: Andy Walls Signed-off-by: Douglas Schilling Landgraf --- linux/drivers/media/dvb/ttpci/av7110_v4l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb/ttpci/av7110_v4l.c') diff --git a/linux/drivers/media/dvb/ttpci/av7110_v4l.c b/linux/drivers/media/dvb/ttpci/av7110_v4l.c index ce64c6214..8986d967d 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c @@ -490,7 +490,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input) if (!av7110->analog_tuner_flags) return 0; - if (input < 0 || input >= 4) + if (input >= 4) return -EINVAL; av7110->current_input = input; -- cgit v1.2.3