Skip to contentSkip to conversation

check unsigned < 0 in media/video/msp3400.c

KJ Eric Sesterhenn / snakebyte 1 participant 1 message Dec 16, 2005

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

hi,

yet another patch, index is unsigned and used as
an array index, so it should be safe to remove
the comparison.

drivers/media/video/msp3400.c renamed from drivers/media/video/msp3400.c.orig +1 -1
@@ -2164,7 +2164,7 @@ static int msp_command(struct i2c_client
 	{
 		struct v4l2_audioout *a=(struct v4l2_audioout *)arg;
 
-		if (a->index<0||a->index>2)
+		if (a->index>2)
 			return -EINVAL;
 
 		if (a->index==2) {

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