[media] media: vb2: add a check for uninitialized buffer
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 12 Oct 2011 16:09:53 +0000 (13:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 8 Nov 2011 10:59:33 +0000 (08:59 -0200)
commit2c2dd6ac738d8a22def46e073fb7383cac8fa180
treeedacdfe8a4392fca7caae99e2cd72368179bb118
parente836a1c078e230dd5a94bb086b186c2be3ec6a84
[media] media: vb2: add a check for uninitialized buffer

__buffer_in_use() might be called for empty/uninitialized buffer in the
following scenario: REQBUF(n, USER_PTR), QUERYBUF(). This patch fixes
kernel ops in such case.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/videobuf2-core.c