aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-07-02 15:09:25 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-12 11:17:23 -0400
commitde81c3c3f5db3ca35548c54024df50be18d64830 (patch)
tree6af23fee7656ecb733570789f8429cb7dd0305ea
parentce27cd3bf989fe7187526cb120c69bf33b0b68d0 (diff)
V4L/DVB (12199): remove redundant tests on unsigned
input, inp and i are unsigned. When negative they are wrapped and caught by the other test. Cc: Andy Walls <awalls@radix.net> Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/ttpci/av7110_v4l.c2
-rw-r--r--drivers/media/video/cx18/cx18-ioctl.c2
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c
index ce64c6214cc4..8986d967d2f4 100644
--- a/drivers/media/dvb/ttpci/av7110_v4l.c
+++ b/drivers/media/dvb/ttpci/av7110_v4l.c
@@ -490,7 +490,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
490 if (!av7110->analog_tuner_flags) 490 if (!av7110->analog_tuner_flags)
491 return 0; 491 return 0;
492 492
493 if (input < 0 || input >= 4) 493 if (input >= 4)
494 return -EINVAL; 494 return -EINVAL;
495 495
496 av7110->current_input = input; 496 av7110->current_input = input;
diff --git a/drivers/media/video/cx18/cx18-ioctl.c b/drivers/media/video/cx18/cx18-ioctl.c
index d7b1921e6666..fc76e4d6ffa7 100644
--- a/drivers/media/video/cx18/cx18-ioctl.c
+++ b/drivers/media/video/cx18/cx18-ioctl.c
@@ -605,7 +605,7 @@ int cx18_s_input(struct file *file, void *fh, unsigned int inp)
605 if (ret) 605 if (ret)
606 return ret; 606 return ret;
607 607
608 if (inp < 0 || inp >= cx->nof_inputs) 608 if (inp >= cx->nof_inputs)
609 return -EINVAL; 609 return -EINVAL;
610 610
611 if (inp == cx->active_input) { 611 if (inp == cx->active_input) {
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index ba87128542e0..bf4c99d19150 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -1790,7 +1790,7 @@ static int saa7134_s_input(struct file *file, void *priv, unsigned int i)
1790 if (0 != err) 1790 if (0 != err)
1791 return err; 1791 return err;
1792 1792
1793 if (i < 0 || i >= SAA7134_INPUT_MAX) 1793 if (i >= SAA7134_INPUT_MAX)
1794 return -EINVAL; 1794 return -EINVAL;
1795 if (NULL == card_in(dev, i).name) 1795 if (NULL == card_in(dev, i).name)
1796 return -EINVAL; 1796 return -EINVAL;