The patch number 12199 was added via Douglas Schilling Landgraf 
<dougsl...@redhat.com>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <linux-me...@vger.kernel.org>

------

From: Roel Kluin  <roel.kl...@gmail.com>
remove redundant tests on unsigned


input, inp and i are unsigned. When negative they are wrapped and caught by the
other test.

Priority: normal

Signed-off-by: Roel Kluin <roel.kl...@gmail.com>
CC: Andy Walls <awa...@radix.net>
Signed-off-by: Douglas Schilling Landgraf <dougsl...@redhat.com>


---

 linux/drivers/media/dvb/ttpci/av7110_v4l.c        |    2 +-
 linux/drivers/media/video/cx18/cx18-ioctl.c       |    2 +-
 linux/drivers/media/video/saa7134/saa7134-video.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff -r 49fdb8e0d7d2 -r deaca20d01e2 linux/drivers/media/dvb/ttpci/av7110_v4l.c
--- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c        Thu Jul 02 16:02:20 
2009 -0300
+++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c        Thu Jul 02 16:09:25 
2009 -0300
@@ -490,7 +490,7 @@ static int vidioc_s_input(struct file *f
        if (!av7110->analog_tuner_flags)
                return 0;
 
-       if (input < 0 || input >= 4)
+       if (input >= 4)
                return -EINVAL;
 
        av7110->current_input = input;
diff -r 49fdb8e0d7d2 -r deaca20d01e2 linux/drivers/media/video/cx18/cx18-ioctl.c
--- a/linux/drivers/media/video/cx18/cx18-ioctl.c       Thu Jul 02 16:02:20 
2009 -0300
+++ b/linux/drivers/media/video/cx18/cx18-ioctl.c       Thu Jul 02 16:09:25 
2009 -0300
@@ -613,7 +613,7 @@ int cx18_s_input(struct file *file, void
        if (ret)
                return ret;
 
-       if (inp < 0 || inp >= cx->nof_inputs)
+       if (inp >= cx->nof_inputs)
                return -EINVAL;
 
        if (inp == cx->active_input) {
diff -r 49fdb8e0d7d2 -r deaca20d01e2 
linux/drivers/media/video/saa7134/saa7134-video.c
--- a/linux/drivers/media/video/saa7134/saa7134-video.c Thu Jul 02 16:02:20 
2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c Thu Jul 02 16:09:25 
2009 -0300
@@ -1797,7 +1797,7 @@ static int saa7134_s_input(struct file *
        if (0 != err)
                return err;
 
-       if (i < 0  ||  i >= SAA7134_INPUT_MAX)
+       if (i >= SAA7134_INPUT_MAX)
                return -EINVAL;
        if (NULL == card_in(dev, i).name)
                return -EINVAL;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/deaca20d01e283b0ba3278db0feb97f7628b4401

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to