[media] uvcvideo: Fix ENUMINPUT handling
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 21 Mar 2012 12:50:36 +0000 (09:50 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 8 May 2012 16:45:53 +0000 (13:45 -0300)
commit31c5f0c5e25ed71eeced170f113bb590f2f1f6f3
tree73100c9b4f3fcf2fd556e0ed12a1707f3576a302
parentaeebb1b3146a70bf02d0115a2be690d856d12e8c
[media] uvcvideo: Fix ENUMINPUT handling

Properly validate the user-supplied index against the number of inputs.
The code used the pin local variable instead of the index by mistake.

Reported-by: Jozef Vesely <vesely@gjh.sk>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_v4l2.c