Skip to contentSkip to conversation

check u32 < 0 in media/video/dpc7146.c

PATCH New Eric Sesterhenn / snakebyte 1 participant 1 message Dec 14, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 check u32 < 0 in media/video/dpc7146.c

hi,

another check < 0. i->index is u32 and since it is used as an index for an array it should stay that way. I just removed the check.

drivers/media/video/dpc7146.c renamed from drivers/media/video/dpc7146.c.orig +1 -1
@@ -266,7 +266,7 @@ static int dpc_ioctl(struct saa7146_fh *
 		struct v4l2_input *i = arg;
 		DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index));
 		
-		if( i->index < 0 || i->index >= DPC_INPUTS) {
+		if( i->index >= DPC_INPUTS) {
 			return -EINVAL;
 		}
 		

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors