media: vb2: verify data_offset only if nonzero bytesused
authorNikhil Devshatwar <nikhil.nd@ti.com>
Thu, 19 Jun 2014 09:56:37 +0000 (15:26 +0530)
committerAnand Balagopalakrishnan <anandb@ti.com>
Mon, 15 Jun 2015 08:06:00 +0000 (13:36 +0530)
commit61234504564dc88feb3c46b1057e82d5665d879b
tree853e4226daa59fd6a7e912b16e3329f5f855dc41
parentd162d6bc8e1834c0b90f7aa7814bcf53a2fe11e6
media: vb2: verify data_offset only if nonzero bytesused

verify_planes would fail if the user space fills up the data_offset field
and bytesused is left as zero. Correct this.
When comparing data_offset > bytesused, bypass the check if the
bytesused field is set to zero.

Change-Id: I4c63bc03f6d455ce00a56d63df08c624579bc831
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
drivers/media/v4l2-core/videobuf2-core.c