public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vivi: Fix test of unsigned in vivi_create_instance()
@ 2009-12-16 16:06 Roel Kluin
  0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-12-16 16:06 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, linux-media, Andrew Morton, LKML

video_nr is unsigned so the test did not work.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Found using coccinelle: http://coccinelle.lip6.fr/

diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 7705fc6..328af3a 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -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;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-16 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-16 16:06 [PATCH] vivi: Fix test of unsigned in vivi_create_instance() Roel Kluin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox