]> git.baikalelectronics.ru Git - kernel.git/commit
USB: uvc_v4l2: cleanup test for end of loop
authorDan Carpenter <error27@gmail.com>
Thu, 12 Aug 2010 07:59:58 +0000 (09:59 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 Aug 2010 03:50:14 +0000 (20:50 -0700)
commitdefa9ac5134def33325cf712954649e8aa4681a3
tree98c7ed8091883f84a2653f152d763656859624ca
parentd6b2632e406081b983c3ea8c9ef512f0154820e9
USB: uvc_v4l2: cleanup test for end of loop

We're trying to test for the the end of the loop here.  "format" is
never NULL.  We don't know what "format->fcc" is because we're past the
end of the loop and I think "fmt->fmt.pix.pixelformat" comes from the
user so we don't know what that is either.  It works, but it's cleaner
to just test to see if (i == ARRAY_SIZE(uvc_formats).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/uvc_v4l2.c