staging: bcm2835-camera: Add sanity checks for queue_setup/CREATE_BUFS
authorDave Stevenson <dave.stevenson@raspberrypi.org>
Tue, 15 Jan 2019 15:35:24 +0000 (15:35 +0000)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:08:18 +0000 (00:08 +0100)
commit87bd42a8795c1023a64cd7d3ea4965aebfe43209
tree4a5697f4e99190b73ea5afe4660e7a8f3c8f5909
parentc1cafdc9f75a372027a84a913c6b786d52628665
staging: bcm2835-camera: Add sanity checks for queue_setup/CREATE_BUFS

Fixes a v4l2-compliance failure when passed a buffer that is
too small.
queue_setup wasn't handling the case where !(*nplanes), as
used from CREATE_BUFS and requiring the driver to sanity
check the provided buffer parameters. It was assuming that
it was always being used in the REQBUFS case where it provides
the buffer properties.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c