aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBee Hock Goh <beehock@gmail.com>2010-04-07 19:57:19 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:57:33 -0400
commitc16dd82b4858b4a01ccce5c0a56ba58993802700 (patch)
tree8f1210b7031c73a28b077bf564ee09d18061ff04
parent4d1f413e820c7e1402475eea254e2bc82d98de35 (diff)
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>
-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 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)
491 unsigned long copied; 491 unsigned long copied;
492 492
493 get_next_buf(dma_q, &buf); 493 get_next_buf(dma_q, &buf);
494 if (!buf) 494 if (buf)
495 outp = videobuf_to_vmalloc(&buf->vb); 495 outp = videobuf_to_vmalloc(&buf->vb);
496 496
497 if (!outp) 497 if (!outp)