Commit c16dd82b authored by Bee Hock Goh's avatar Bee Hock Goh Committed by Mauro Carvalho Chehab

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: default avatarBee Hock Goh <beehock@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 4d1f413e
...@@ -491,7 +491,7 @@ static inline int tm6000_isoc_copy(struct urb *urb) ...@@ -491,7 +491,7 @@ static inline int tm6000_isoc_copy(struct urb *urb)
unsigned long copied; unsigned long copied;
get_next_buf(dma_q, &buf); get_next_buf(dma_q, &buf);
if (!buf) if (buf)
outp = videobuf_to_vmalloc(&buf->vb); outp = videobuf_to_vmalloc(&buf->vb);
if (!outp) if (!outp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment