Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 223ffe5f authored by Roel Kluin's avatar Roel Kluin Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB: cleanup redundant tests on unsigned



Remove redundant tests on unsigned.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ca19d842
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -1413,7 +1413,7 @@ static struct v4l2_input knc1_inputs[KNC1_INPUTS] = {
static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i)
{
	dprintk(1, "VIDIOC_ENUMINPUT %d.\n", i->index);
	if (i->index < 0 || i->index >= KNC1_INPUTS)
	if (i->index >= KNC1_INPUTS)
		return -EINVAL;
	memcpy(i, &knc1_inputs[i->index], sizeof(struct v4l2_input));
	return 0;
+3 −3
Original line number Diff line number Diff line
@@ -1064,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);
@@ -1082,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);
+1 −1
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i)
{
	DEB_EE(("VIDIOC_ENUMINPUT %d.\n", i->index));

	if (i->index < 0 || i->index >= HEXIUM_INPUTS)
	if (i->index >= HEXIUM_INPUTS)
		return -EINVAL;

	memcpy(i, &hexium_inputs[i->index], sizeof(struct v4l2_input));
+1 −1
Original line number Diff line number Diff line
@@ -325,7 +325,7 @@ static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i)
{
	DEB_EE(("VIDIOC_ENUMINPUT %d.\n", i->index));

	if (i->index < 0 || i->index >= HEXIUM_INPUTS)
	if (i->index >= HEXIUM_INPUTS)
		return -EINVAL;

	memcpy(i, &hexium_inputs[i->index], sizeof(struct v4l2_input));
Loading