From c16dd82b4858b4a01ccce5c0a56ba58993802700 Mon Sep 17 00:00:00 2001 From: Bee Hock Goh Date: Wed, 7 Apr 2010 20:57:19 -0300 Subject: [PATCH] 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/tm6000/tm6000-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 67f4d2908c35..be6fcb79ef07 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -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) -- 2.34.1