public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] zoran: invalid test on unsigned
@ 2009-04-26 15:45 Roel Kluin
  2009-04-26 18:35 ` Trent Piepho
  2009-04-27 15:52 ` [Mjpeg-users] " Alan Cox
  0 siblings, 2 replies; 4+ messages in thread
From: Roel Kluin @ 2009-04-26 15:45 UTC (permalink / raw)
  To: mjpeg-users, linux-media, Andrew Morton

fmt->index is unsigned. test doesn't work

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Is there another test required?

diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c
index 092333b..0db5d0f 100644
--- a/drivers/media/video/zoran/zoran_driver.c
+++ b/drivers/media/video/zoran/zoran_driver.c
@@ -1871,7 +1871,7 @@ static int zoran_enum_fmt(struct zoran *zr, struct v4l2_fmtdesc *fmt, int flag)
 		if (num == fmt->index)
 			break;
 	}
-	if (fmt->index < 0 /* late, but not too late */  || i == NUM_FORMATS)
+	if (i == NUM_FORMATS)
 		return -EINVAL;
 
 	strncpy(fmt->description, zoran_formats[i].name, sizeof(fmt->description)-1);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-27 19:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-26 15:45 [PATCH] zoran: invalid test on unsigned Roel Kluin
2009-04-26 18:35 ` Trent Piepho
2009-04-27 15:52 ` [Mjpeg-users] " Alan Cox
2009-04-27 19:31   ` Trent Piepho

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