提交 c16dd82b 编写于 作者: B Bee Hock Goh 提交者: 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: NBee Hock Goh <beehock@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 4d1f413e
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册