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-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c16dd82b4858b4a01ccce5c0a56ba58993802700;p=openwrt%2Fstaging%2Fblogic.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 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)