video: driver: fix invalid ptr dereference issue with struct v4l2_buffer
qbuf call for actual bitstream and yuv buffer 'struct v4l2_buffer'
length field indicates numplanes and for metadata buffers, length field
indicates capacity. So always check length field before accessing/
dereferencing b->m.planes or b->m.fd.
Change-Id: I409b28e0a66bd5c031b2c98c6d7614da99164a6c
Signed-off-by: Govindaraj Rajagopal <[email protected]>