V4L/DVB: v4l: videobuf: prevent passing a NULL to dma_free_coherent()
authorPawel Osciak <p.osciak@samsung.com>
Tue, 20 Jul 2010 16:49:16 +0000 (13:49 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 30 Sep 2010 10:22:22 +0000 (07:22 -0300)
When a driver that uses videobuf-dma-contig is used with the USERPTR
memory access method a kernel oops might happen: a NULL address may be
passed to dma_free_coherent(). This happens when an application calls
REQBUFS and then exits without queuing any buffers. This patch fixes
that bug.

Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

No differences found