Skip to contentSkip to conversation

vivi: Fix test of unsigned in vivi_create_instance()

PATCH New Roel Kluin 1 participant 1 message Dec 16, 2009 Media (V4L/DVB)

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 vivi: Fix test of unsigned in vivi_create_instance()

video_nr is unsigned so the test did not work.

---
Found using coccinelle: http://coccinelle.lip6.fr/

drivers/media/video/vivi.c +1 -1
index 7705fc6..328af3a 100644
@@ -1375,7 +1375,7 @@ static int __init vivi_create_instance(int inst)
 	snprintf(vfd->name, sizeof(vfd->name), "%s (%i)",
 			vivi_template.name, vfd->num);
 
-	if (video_nr >= 0)
+	if (video_nr != -1)
 		video_nr++;
 
 	dev->vfd = vfd;