summaryrefslogtreecommitdiff
path: root/drivers/staging/tm6000
diff options
context:
space:
mode:
authorBee Hock Goh <beehock@gmail.com>2010-04-07 23:57:19 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 15:57:33 (GMT)
commitc16dd82b4858b4a01ccce5c0a56ba58993802700 (patch)
tree8f1210b7031c73a28b077bf564ee09d18061ff04 /drivers/staging/tm6000
parent4d1f413e820c7e1402475eea254e2bc82d98de35 (diff)
downloadlinux-fsl-qoriq-c16dd82b4858b4a01ccce5c0a56ba58993802700.tar.xz
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 <beehock@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/tm6000')
-rw-r--r--drivers/staging/tm6000/tm6000-video.c2
1 files changed, 1 insertions, 1 deletions
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)