media: uvcvideo: Fix .queue_setup() to check the number of planes
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tue, 8 Aug 2017 12:56:22 +0000 (08:56 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 12:09:00 +0000 (08:09 -0400)
commitdfa6f2400c1f0bb2183996ac1c74f1fc859fca32
treef0ffaecba577fff40fe93073d045f7989fb41930
parent7e09f7d5c790278ab98e5f2c22307ebe8ad6e8ba
media: uvcvideo: Fix .queue_setup() to check the number of planes

According to documentation of struct vb2_ops the .queue_setup() callback
should return an error if the number of planes parameter contains an
invalid value on input. Fix this instead of ignoring the value.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/uvc/uvc_queue.c