aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/mx3_camera.c3
-rw-r--r--drivers/media/video/pwc/pwc-if.c3
-rw-r--r--drivers/media/video/videobuf-dma-sg.c3
3 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c
index aa871c2936b3..330d42e15498 100644
--- a/drivers/media/video/mx3_camera.c
+++ b/drivers/media/video/mx3_camera.c
@@ -1186,13 +1186,12 @@ static int __devinit mx3_camera_probe(struct platform_device *pdev)
1186 goto egetres; 1186 goto egetres;
1187 } 1187 }
1188 1188
1189 mx3_cam = vmalloc(sizeof(*mx3_cam)); 1189 mx3_cam = vzalloc(sizeof(*mx3_cam));
1190 if (!mx3_cam) { 1190 if (!mx3_cam) {
1191 dev_err(&pdev->dev, "Could not allocate mx3 camera object\n"); 1191 dev_err(&pdev->dev, "Could not allocate mx3 camera object\n");
1192 err = -ENOMEM; 1192 err = -ENOMEM;
1193 goto ealloc; 1193 goto ealloc;
1194 } 1194 }
1195 memset(mx3_cam, 0, sizeof(*mx3_cam));
1196 1195
1197 mx3_cam->clk = clk_get(&pdev->dev, NULL); 1196 mx3_cam->clk = clk_get(&pdev->dev, NULL);
1198 if (IS_ERR(mx3_cam->clk)) { 1197 if (IS_ERR(mx3_cam->clk)) {
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index f3dc89da4c4e..b821065e3870 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -287,14 +287,13 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
287 /* create frame buffers, and make circular ring */ 287 /* create frame buffers, and make circular ring */
288 for (i = 0; i < default_fbufs; i++) { 288 for (i = 0; i < default_fbufs; i++) {
289 if (pdev->fbuf[i].data == NULL) { 289 if (pdev->fbuf[i].data == NULL) {
290 kbuf = vmalloc(PWC_FRAME_SIZE); /* need vmalloc since frame buffer > 128K */ 290 kbuf = vzalloc(PWC_FRAME_SIZE); /* need vmalloc since frame buffer > 128K */
291 if (kbuf == NULL) { 291 if (kbuf == NULL) {
292 PWC_ERROR("Failed to allocate frame buffer %d.\n", i); 292 PWC_ERROR("Failed to allocate frame buffer %d.\n", i);
293 return -ENOMEM; 293 return -ENOMEM;
294 } 294 }
295 PWC_DEBUG_MEMORY("Allocated frame buffer %d at %p.\n", i, kbuf); 295 PWC_DEBUG_MEMORY("Allocated frame buffer %d at %p.\n", i, kbuf);
296 pdev->fbuf[i].data = kbuf; 296 pdev->fbuf[i].data = kbuf;
297 memset(kbuf, 0, PWC_FRAME_SIZE);
298 } 297 }
299 } 298 }
300 299
diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c
index 20f227ee2b3e..ab684e807034 100644
--- a/drivers/media/video/videobuf-dma-sg.c
+++ b/drivers/media/video/videobuf-dma-sg.c
@@ -69,10 +69,9 @@ static struct scatterlist *videobuf_vmalloc_to_sg(unsigned char *virt,
69 struct page *pg; 69 struct page *pg;
70 int i; 70 int i;
71 71
72 sglist = vmalloc(nr_pages * sizeof(*sglist)); 72 sglist = vzalloc(nr_pages * sizeof(*sglist));
73 if (NULL == sglist) 73 if (NULL == sglist)
74 return NULL; 74 return NULL;
75 memset(sglist, 0, nr_pages * sizeof(*sglist));
76 sg_init_table(sglist, nr_pages); 75 sg_init_table(sglist, nr_pages);
77 for (i = 0; i < nr_pages; i++, virt += PAGE_SIZE) { 76 for (i = 0; i < nr_pages; i++, virt += PAGE_SIZE) {
78 pg = vmalloc_to_page(virt); 77 pg = vmalloc_to_page(virt);