[media] videobuf2-core: call __setup_offsets only for mmap memory type
authorPhilipp Zabel <[email protected]>
Thu, 19 Sep 2013 07:37:29 +0000 (04:37 -0300)
committerMauro Carvalho Chehab <[email protected]>
Thu, 17 Oct 2013 13:53:21 +0000 (10:53 -0300)
commitdc77523c5da5513df1bbc74db2a522a94f4cec0e
tree939bb39d84748d5b5415e942c775352a975a3387
parent8ca5d2d8e58df7235b77ed435e63c484e123fede
[media] videobuf2-core: call __setup_offsets only for mmap memory type

__setup_offsets fills the v4l2_planes' mem_offset fields, which is only valid
for V4L2_MEMORY_MMAP type buffers. For V4L2_MEMORY_DMABUF and _USERPTR buffers,
this incorrectly overwrites the fd and userptr fields.

Reported-by: Michael Olbrich <[email protected]>
Signed-off-by: Philipp Zabel <[email protected]>
Acked-by: Marek Szyprowski <[email protected]>
Acked-by: Pawel Osciak <[email protected]>
Acked-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/media/v4l2-core/videobuf2-core.c