From: Bee Hock Goh Date: Wed, 7 Apr 2010 23:57:19 +0000 (-0300) Subject: V4L/DVB: TM6000: Fix code which cause memory corruption X-Git-Tag: v2.6.35-rc1~480^2~174 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c16dd82b4858b4a01ccce5c0a56ba58993802700;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 --- diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 67f4d29..be6fcb7 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)