From: Trent Piepho Date: Fri, 1 May 2009 00:03:34 +0000 (-0300) Subject: V4L/DVB (11660): zoran: fix bug when enumerating format -1 X-Git-Tag: linux-omap-v2.6.30-rc6~47^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=171f48e254339548a910867c7a77c4a4d16e7e16;p=pandora-kernel.git V4L/DVB (11660): zoran: fix bug when enumerating format -1 If someone requests a format at fmt->index == (unsigned)-1 and the first format in the array doesn't have the requested type then num will still be -1 when it's compared to fmt->index and there will appear to be a match. Restructure the loop so this can't happen. It's simpler this way too. The unnecessary check for (unsigned)fmt->index < 0 found by Roel Kluin is removed this way too. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed