V4L/DVB: TM6000: Fix code which cause memory corruption

The driver was doing malloc when buf is null causing memory corruption.

The analog part is still pretty much broken but at least fixing this
will stop it from crashing the machine when streamon.

Signed-off-by: Bee Hock Goh <beehock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Bee Hock Goh 2010-04-07 20:57:19 -03:00 committed by Mauro Carvalho Chehab
parent 4d1f413e82
commit c16dd82b48
1 changed files with 1 additions and 1 deletions

View File

@ -491,7 +491,7 @@ static inline int tm6000_isoc_copy(struct urb *urb)
unsigned long copied;
get_next_buf(dma_q, &buf);
if (!buf)
if (buf)
outp = videobuf_to_vmalloc(&buf->vb);
if (!outp)